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

Print size of DH keysize when errors are encountered

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        We should print the size of DH keysizes encountered when we throw exceptions in related code.

        sun/security/ssl/ServerHandshaker.java :

        136 try {
        137 customizedDHKeySize = Integer.parseUnsignedInt(property);
        138 if (customizedDHKeySize < 1024 || customizedDHKeySize > 2048) {
        139 throw new IllegalArgumentException(
        140 "Customized DH key size should be positive integer " +
        141 "between 1024 and 2048 bits, inclusive");
        142 }
        143 } catch (NumberFormatException nfe) {
        144 throw new IllegalArgumentException(
        145 "Invalid system property jdk.tls.ephemeralDHKeySize");
        146 }

        sun/security/pkcs11/P11KeyPairGenerator.java
        281 if ((keySize != 2048) &&
        282 ((keySize > 1024) || ((keySize & 0x3f) != 0))) {
        283 throw new InvalidAlgorithmParameterException(algorithm +
        284 " key must be multiples of 64 if less than 1024 bits" +
        285 ", or 2048 bits");

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  snikandrova Svetlana Nikandrova (Inactive)
                  Reporter:
                  coffeys Sean Coffey
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: