Disclaimer: on SO I found many similar questions and some answers but none solved my issue.
I have this easy PHP code:
Some random finding from the internet which could help:
It may be a certificate problem. Try the stream options allow_self_signed and verify_peer to check that.
allow_self_signed
verify_peer
Try to use explicitely sslv2:// or sslv3:// ?
sslv2://
sslv3://
Permission problem on "/dev/urandom"