I'm using EC2 to host a PHP web service but I'm pretty sure the answer lies within the OpenSSL configuration so I'm asking here rather than on SO.
When connecting to a particular web service site I get this error from openssl:
Some googling seems to indicate that this means that for whatever reason it doesn't like the certificate that the site presents. Another service that I'm using works fine so I suspect that for some reason there's no trusted certificate for the service that's failing.
So two questions: How do I add a trusted CA to openssl? How do I get a certificate for the CA (GoDaddy)? Is it possible that something else is wrong? It seems weird to me that EC2 wouldn't support a GoDaddy certificate out of the box.
Edit I should also note that the exact same test script works on my local machine (MacBook Pro)