no peer certificate available
The handshake failed before a certificate arrived
Seen in openssl s_client
openssl s_client got no certificate from the server, which means the TLS handshake failed or never really started.
Common causes
- The server needs SNI and -servername was not given, so it aborted the handshake.
- The port does not speak TLS directly, for example a STARTTLS port such as 25 or 587 without -starttls smtp.
- No TLS version or cipher in common, so the server sent an alert or closed the connection.
- A firewall or proxy reset the connection.
How to fix it
- Add -servername host to the command.
- For mail ports use -starttls smtp (or imap, pop3), or connect to the implicit TLS port.
- Read the error lines printed above "no peer certificate available"; they name the alert or failure.
- Try -tls1_2 and -tls1_3 to see which version the server accepts.
Got a different message? Paste it into the error explainer.
Related errors
- unable to get local issuer certificate · The client can't find the certificate's issuer
- unable to verify the first certificate · The intermediate certificate is missing
- certificate has expired · The server certificate has expired
- self signed certificate in certificate chain · The chain ends in an untrusted root
- curl: (51) SSL: no alternative certificate subject name matches target host name · The certificate doesn't match the hostname
- curl: (35) SSL connect error · The TLS handshake failed
- sslv3 alert handshake failure · The server rejected the TLS handshake
- tlsv1 alert protocol version · The peer does not accept this TLS version
- tlsv1 alert unknown ca · The peer doesn't trust the certificate's CA
- Unable to establish SSL connection. · wget could not complete the TLS handshake
- ERROR: cannot verify example.com's certificate · wget doesn't trust the server's certificate
- Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames · The certificate doesn't cover this hostname