write:errno=104 / New, (NONE), Cipher is (NONE)

So if you’re having some issues with SSL connections, it’s higly likely you’re experiencing them from client version openssl 1.0.2. the fix is below and i can confirm it works on both openssl 1.0.1 and 1.0.2.

openssl s_client -connect yourdomain.com:5671 -showcerts

no peer certificate available

No client certificate CA names sent

SSL handshake has read 0 bytes and written 305 bytes

New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
Protocol : TLSv1.2
Cipher : 0000
Key-Arg : None
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1484575655
Timeout : 300 (sec)
Verify return code: 0 (ok)

openssl s_client \

-cipher RSA \

-connect mydomain.com:5671 \

-servername mydomain.com \

-cert client/cert.pem \

-key client/key.pem \

-CAfile testca/cacert.pem \



configure: error: Cannot find OpenSSL’s – freebsd

configure: error: Cannot find OpenSSL’s <evp.h> freebsd

usually you get this error if openssl path is not specified when compiling php i got this error when compiling php-5.2.9.


cd /usr/ports/security/openssl

make install distclean

then add –with-ssl=/usr to the ./configure line for php.

should work like a charm