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");