javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values

Information Security | KM. | 2 years ago
  1. 0

    encryption - Understanding Java Security Providers - Information Security Stack Exchange

    stackexchange.com | 7 months ago
    javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values
  2. 0

    Understanding Java Security Providers - FAQs System

    faqssys.info | 1 year ago
    javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values
  3. 0

    Understanding Java Security Providers

    Information Security | 2 years ago | KM.
    javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Google Cloud Storage Error

    Stack Overflow | 2 years ago | user2751441
    javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values
  6. 0

    FULL PRODUCT VERSION : Non working version (Solaris 11): java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode) Working version (Solaris 10): java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode) ADDITIONAL OS VERSION INFORMATION : Non working version: SunOS jenprd01 5.11 11.1 sun4v sparc sun4v Working version: SunOS hudprd01 5.10 Generic_150401-01 i86pc i386 i86pc A DESCRIPTION OF THE PROBLEM : JDK 1.6.0_45 behaviour different on Solaris 11 than Solaris 10 for SSL connections. java -Djavax.net.debug=all sslTest > debug_output.txt 2>&1 Throws Exception on Solaris 11 - works on Solaris 10, same JDK version. ADDITIONAL REGRESSION INFORMATION: Non working version (Solaris 11): java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode) Working version (Solaris 10): java version "1.6.0_45" Java(TM) SE Runtime Environment (build 1.6.0_45-b06) Java HotSpot(TM) Server VM (build 20.45-b01, mixed mode) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : java -Djavax.net.debug=all sslTest > debug_output.txt 2>&1 This works on Solaris 10, throws Exception on Solaris 11. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Clean SSL connection / request ACTUAL - Exception ERROR MESSAGES/STACK TRACES THAT OCCUR : main, handling exception: java.lang.RuntimeException: Could not parse key values main, SEND TLSv1 ALERT: fatal, description = internal_error main, WRITE: TLSv1 Alert, length = 2 [Raw write]: length = 7 0000: 15 03 01 00 02 02 50 ......P main, called closeSocket() Exception in thread "main" javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1708) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1691) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1222) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) at sslTest.main(sslTest.java:15) Caused by: java.lang.RuntimeException: Could not parse key values at sun.security.pkcs11.P11Key$P11ECPublicKey.fetchValues(P11Key.java:1000) at sun.security.pkcs11.P11Key$P11ECPublicKey.getW(P11Key.java:1021) at com.sun.net.ssl.internal.ssl.ECDHClientKeyExchange.<init>(ECDHClientKeyExchange.java:40) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:782) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:241) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215) ... 6 more Caused by: java.io.IOException: DerInputStream.getLength(): lengthTag=10, too big. at sun.security.util.DerInputStream.getLength(DerInputStream.java:544) at sun.security.util.DerValue.init(DerValue.java:347) at sun.security.util.DerValue.<init>(DerValue.java:277) at sun.security.pkcs11.P11Key$P11ECPublicKey.fetchValues(P11Key.java:991) ... 15 more REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.URL; import javax.net.ssl.HttpsURLConnection; public class sslTest { public static void main(String[] args) throws IOException { String httpsURL = "https://maps.googleapis.com/maps/api/js?libraries=places&sensor=true"; URL myurl = new URL(httpsURL); HttpsURLConnection con = (HttpsURLConnection) myurl.openConnection(); InputStream ins = con.getInputStream(); InputStreamReader isr = new InputStreamReader(ins); BufferedReader in = new BufferedReader(isr); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : -Dcom.sun.net.ssl.enableECC=false as startup option for Java

    JDK Bug System | 3 years ago | Webbug Group
    javax.net.ssl.SSLException: java.lang.RuntimeException: Could not parse key values

    5 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      extra data given to DerValue constructor

      at sun.security.util.DerValue.init()
    2. Java RT
      DerValue.<init>
      1. sun.security.util.DerValue.init(DerValue.java:368)
      2. sun.security.util.DerValue.<init>(DerValue.java:277)
      2 frames
    3. sun.security.pkcs11
      P11Key$P11ECPublicKey.getW
      1. sun.security.pkcs11.P11Key$P11ECPublicKey.fetchValues(P11Key.java:945)
      2. sun.security.pkcs11.P11Key$P11ECPublicKey.getW(P11Key.java:975)
      2 frames
    4. Java JSSE
      SSLSocketImpl.startHandshake
      1. com.sun.net.ssl.internal.ssl.ECDHClientKeyExchange.<init>(ECDHClientKeyExchange.java:40)
      2. com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:782)
      3. com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:241)
      4. com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
      5. com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
      6. com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:943)
      7. com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1188)
      8. com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1215)
      9. com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1199)
      9 frames
    5. Unknown
      InstallCert.main
      1. InstallCert.main(InstallCert.java:98)
      1 frame