What it means: Java could not confirm the server's identity: the name, the pin or the certificate itself is missing.
Free online tool — SSL certificate checker: instant results, no signup.
Runs a full TLS check: handshake, protocol versions, certificate chain, trust and expiry.
javax.net.ssl.SSLPeerUnverifiedException is a subclass of SSLException that, in the Java documentation's words, «indicates that the peer's identity has not been verified» (Java SE API). Unlike PKIX path building failed, which says the certificate chain is not trusted, this exception is thrown when trust in the chain is not the question: the certificate is for another name, does not match a pin, or was never received.
Three messages cover almost every report:
Hostname example.com not verified: followed by the certificate pin, DN and subjectAltNames — OkHttp's host name check (OkHttp ConnectPlan). Apache HttpClient 4.5 says Certificate for <example.com> doesn't match any of the subject alternative names: [...].Certificate pinning failure! followed by Peer certificate chain: and Pinned certificates for example.com: — OkHttp's CertificatePinner found no pin that matches the chain.peer not authenticated — thrown by the JDK when code asks SSLSession.getPeerCertificates() on a session that has no peer certificates, typically because the handshake did not complete (SSLSessionImpl).| Message | Cause | Fix |
|---|---|---|
| Hostname ... not verified / doesn't match any of the subject alternative names | Calling the server by IP, an internal alias or a name the certificate does not list | Use a listed name or reissue the certificate with the name in SAN |
| Same, only for some users | Wrong virtual host answered: SNI not sent, or DNS points to another server | Send the right host name; check DNS |
| Certificate pinning failure! | The server's key or CA changed and the app pins the old one | Ship updated pins; pin with a backup |
| peer not authenticated | Handshake failed silently (protocol or cipher mismatch, client certificate required) and code read the session anyway | Enable handshake debugging, fix the TLS settings |
Check the name against the certificate's subjectAltName list, which is what modern clients and the CA/Browser Forum rules rely on; do not count on a name that appears only in the Common Name. The host name in the URL is what is checked, so a request to https://203.0.113.10/ fails against a certificate for api.example.com even when that is the right server. A wildcard covers one label: *.example.com matches api.example.com but not example.com or a.b.example.com.
List the names the server's certificate actually covers, sending the same SNI your app sends:
openssl s_client -connect api.example.com:443 -servername api.example.com </dev/null 2>/dev/null \
| openssl x509 -noout -subject -ext subjectAltName
keytool -printcert -sslserver api.example.com:443 | grep -A3 SubjectAlternativeNameFor peer not authenticated, turn on the JSSE debug log for one run and read the last messages before the failure:
java -Djavax.net.debug=ssl:handshake -jar app.jarFor a pinning failure, compute the pin of what the server presents now and compare it with the pins in your code. OkHttp pins are sha256/ plus the base64 SHA-256 of the certificate's public key info:
openssl s_client -connect api.example.com:443 -servername api.example.com </dev/null 2>/dev/null \
| openssl x509 -pubkey -noout | openssl pkey -pubin -outform der \
| openssl dgst -sha256 -binary | openssl enc -base64The OkHttp exception prints the same hashes for every certificate in the chain, so you can also copy them from the stack trace.
NoopHostnameVerifier or a HostnameVerifier that returns true; that accepts a valid certificate for any other site.PKIX path building failed earlier, follow the PKIX page: that is a trust store problem, not a name problem.openssl s_client -connect api.example.com:443 -servername api.example.com -verify_hostname api.example.com </dev/null 2>/dev/null | grep 'Verify return code'
# Verify return code: 0 (ok)-verify_hostname makes OpenSSL apply the same name check your Java client does. The SSL/TLS checker shows the certificate names and chain your server presents from outside.
SSL/TLS is the encryption protocol that protects data between the browser and server. Our tool analyzes the certificate, chain of trust, TLS version, and knownvulnerabilities.
Issuer, validity period, signature algorithm, covered domains (SAN), and validation type (DV/OV/EV).
Full chain verification: from leaf certificate through intermediates to root CA.
Protocol version (TLS 1.2/1.3), cipher suites, Perfect Forward Secrecy (PFS) support.
Set up a monitor — get Telegram and email alerts 30/14/7 days before expiration.
SSL certificate monitoring
TLS config audit
HTTPS as ranking factor
customer trust
www and subdomains.Strict-Transport-Security header forces browsers to always use HTTPS.SSL certificate monitoring, check history and alerts 30 days before expiry.
Sign up freePKIX path building failed means Java does not trust the certificate chain. SSLPeerUnverifiedException means the identity check failed: wrong host name, a failed pin, or no peer certificate at all.
Code asked the TLS session for the server's certificates, but the session has none, usually because the handshake failed. Run with -Djavax.net.debug=ssl:handshake to see why.
The server now presents a key that none of your pins match, typically after a certificate change. Add the new pin printed in the exception, keep a backup pin, and release the update before rotating keys.
You can, but then any valid certificate for any domain is accepted, which defeats TLS. Fix the name in the URL or in the certificate instead.
Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.