Posts

Showing posts with the label SSL

JSSE Troubleshooting: Certificates Order in TLS Handshaking

Issue: Failed with a exception: java.security.cert.CertPathValidatorException: subject/issuer name chaining check failed. Example: Test case: 1 // 2 // JSSE Troubleshooting: Disordered Certificate List in TLS Handshaking 3 // 4 import java.net.*; 5 6 public class DisorderedCertificateList { 7 public static void main(String[] Arguments) throws Exception { 8 URL url = new URL("https://myservice.example.com/"); 9 URLConnection connection = url.openConnection(); 10 11 connection.getInputStream().close(); 12 } 13 } Test environment: The HTTPS server, myservice.example.com, is configurated with a certificate path that the certificates in the path is out of order. For example, the expected certificate path is server_certificate -> intermediate ca -> seld-signed root ca. However, the certificate path is configurated as server_certificate -> seld-signed root ca -> intermediate ca. Test Result: Exception in ...