/ / OpenJDK: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certyfikaty nie są zgodne z ograniczeniami algorytmu - algorytm, ssl, certyfikat, molo, openjdk

OpenJDK: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certyfikaty nie są zgodne z ograniczeniami algorytmu - algorytm, ssl, certyfikat, pomost, openjdk

Moja usługa internetowa w molo z OpenJDK1.8.0 spróbuj ustanowić połączenie HTTPS z serwerem Microsoft, a otrzymałem ten błąd:

javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1509)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:747)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at org.apache.commons.httpclient.HttpConnection.flushRequestOutputStream(HttpConnection.java:828)
at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2116)
at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
......

Zaufaj certyfikatowi serwera Microsoft wygląda dobrze:

  • Klucz publiczny: RSA (2048 bitów)
  • Algorytm podpisu: sha256RSA
  • Algorytm skrótu podpisu: sha256 Żaden algorathm nie pasował do jre_path/lib/security/java.security disableAlgorithm:

    jdk.certpath.disabledAlgorithms = MD2, MD5, RSA keySize <1024 jdk.tls.disabledAlgorithms = SSLv3, RC4, MD5withRSA, DH keySize <768

Sprawdziłem obsługę pakietu TLS Cipher Suite zarówno w molo, jak i Microsoft, wszystko wygląda dobrze:

  • TLS1_1: ECDHE-RSA-AES256-SHA
  • TLS1_2: ECDHE-RSA-AES256-SHA384
  • TLS1: ECDHE-RSA-AES256-SHA

Moje pytanie:

  1. Co spowodowało wyjątek „Certyfikaty nie są zgodne z ograniczeniami algorytmu”?
  2. O ile mi wiadomo, OpenJDK obsługuje nieograniczoną siłę kryptograficzną bez konieczności posiadania dodatkowych plików zasad.

Dzięki!

Odpowiedzi:

0 dla odpowiedzi № 1

Spowodowane przez algorytm podpisu w certyfikacie używanym w serwerze Windows przyjęto alogrithm w przyszłości TLSv1.3 standard, więc OpenJDK wyrzucił ten wyjątek.