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

receiving rsa_fixed_dh or dss_fixed_dh cert request types causes null pointer.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: unknown, 1.0.2
    • Fix Version/s: 1.0.3
    • Component/s: security-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.0.3
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description


        Pierre of HP reports that SSL-C is throwing NullPointerExceptions:

        java.lang.NullPointerException
        at com.sun.net.ssl.internal.ssl.X509KeyManagerImpl.getClientAliases([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.X509KeyManagerImpl.chooseClientAlias([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.JsseX509KeyManager.chooseClientAlias([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.a([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a([DashoPro-V1.2-120198])
        at com.sun.net.ssl.internal.ssl.AppOutputStream.write([DashoPro-V1.2-120198])
        at java.io.OutputStream.write(Unknown Source)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake([DashoPro-V1.2-120198])
        at SSLSocketClientWithClientAuth.main(SSLSocketClientWithClientAuth.java:138)

        The problem is with the code here. If we receive anything
        besides DSA and RSA, we are sending a null keytype into the KM:
         
                        String keyType = null;

                        if (certRequest.types[i] == CertificateRequest.cct_rsa_sign)
                            keyType = "RSA";
                        else if (certRequest.types[i] ==
                                CertificateRequest.cct_dss_sign)
                            keyType = "DSA";
                        alias = km.chooseClientAlias(new String[] { keyType },
                                certRequest.getAuthorities(), conn);

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                wetmore Bradford Wetmore
                Reporter:
                wetmore Bradford Wetmore
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: