Thursday, December 23, 2021

Re: PHP 7.4: SSL routines:CONNECT_CR_CERT:certificate verify failed

On Thu, Dec 23, 2021 at 12:51:14AM +0100, Leo Unglaub wrote:
> Here is the successful response:
>
> >CONNECTED(00000003)
> >3143473289712:error:1400442E:SSL routines:CONNECT_CR_SRVR_HELLO:tlsv1 alert protocol version:/usr/src/lib/libssl/tls13_lib.c:151:
> >---
> >no peer certificate available
> >---
> >No client certificate CA names sent
> >---
> >SSL handshake has read 5 bytes and written 201 bytes
> >---
> >New, (NONE), Cipher is (NONE)
> >Secure Renegotiation IS NOT supported
> >Compression: NONE
> >Expansion: NONE
> >No ALPN negotiated
> >SSL-Session:
> > Protocol : TLSv1.2
> > Cipher : 0000
> > Session-ID: Session-ID-ctx: Master-Key: Start Time:
> >1640216653
> > Timeout : 7200 (sec)
> > Verify return code: 0 (ok)
> >---

That is not a successful response.

Try this:

# echo "foobar" | nc -l localhost 12345 &

# openssl s_client -tls1_2 -connect localhost:12345

and compare the output to what you have above.

Then try:

# echo "foobar" | nc -l -c -C /etc/ssl/server.crt -K /etc/ssl/private/server.key localhost 12345 &

# openssl s_client -tls1_2 -connect localhost:12345

To see what a successful response looks like.

No comments:

Post a Comment