Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8132082

Let OracleUcrypto accept RSAPrivateKey

XMLWordPrintable

    • b82
    • generic
    • solaris
    • Verified

        An issue since fix for JDK-8081297 - seen in this testcase :

        sun/security/ssl/com/sun/net/ssl/internal/ssl/ClientHandshaker/RSAExport.java

        The exception message shows as :
        "javax.net.ssl.SSLProtocolException: Unable to process PreMasterSecret, may be too big"

        but the main exception is swallowed by security code. Some instrumenting shows this :

        ** needFailover is : false
        ** DEBUG java.security.InvalidKeyException: RSAPrivateCrtKey required for decryption
        java.security.InvalidKeyException: RSAPrivateCrtKey required for decryption
                at com.oracle.security.ucrypto.NativeRSACipher.engineInit(NativeRSACipher.java:209)
                at javax.crypto.Cipher.init(Cipher.java:1394)
                at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:133)
                at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:241)
                at sun.security.ssl.Handshaker.processLoop(Handshaker.java:983)
                at sun.security.ssl.Handshaker.processRecord(Handshaker.java:917)
                at sun.security.ssl.SSLSocketImpl.processInputRecord(SSLSocketImpl.java:1101)
                at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1038)
                at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:949)
                at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1356)
                at sun.security.ssl.SSLSocketImpl.bytesInCompletePacket(SSLSocketImpl.java:883)
                at sun.security.ssl.AppInputStream.read(AppInputStream.java:144)
                at sun.security.ssl.AppInputStream.read(AppInputStream.java:84)
                at RSAExport.doServerSide(RSAExport.java:359)

              igerasim Ivan Gerasimov
              coffeys Sean Coffey
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: