SSL certificates work fine from command line but fail in script
- by jrallison
I'm trying to setup email notifications for my continuous integration server. I have a script which uses nail to send the email when the build works:
#!/bin/bash
echo "Build Worked!" | nail -A myisp -s 'Build Success' [email protected]
When I run this from the command line with sh build-worked, it works and I receive the email. However, when I start the continuous integration server which executes the same script, I get the following error:
nail: /opt/bitnami/common/lib/libssl.so.0.9.8: no version information available (required by nail)
nail: /opt/bitnami/common/lib/libcrypto.so.0.9.8: no version information available (required by nail)
Error with certificate at depth: 0
issuer = /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/[email protected]
subject = /C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
err 20: unable to get local issuer certificate
Continue (y/n)? could not initiate SSL/TLS connection: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
. . . message not sent.
I must be messing some configuration, any ideas?