changeset 17408:3179ec9914d3

8178466: Better RSA parameters Reviewed-by: mullan, ahgross
author valeriep
date Thu, 31 Aug 2017 21:44:19 +0000
parents e630a485f6fb
children c71d01e8e5c4
files src/java.base/share/classes/sun/security/tools/keytool/Main.java src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java
diffstat 2 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Thu Aug 24 19:18:51 2017 +0000
+++ b/src/java.base/share/classes/sun/security/tools/keytool/Main.java	Thu Aug 31 21:44:19 2017 +0000
@@ -1788,8 +1788,7 @@
             } else if ("RSA".equalsIgnoreCase(keyAlgName)) {
                 keysize = SecurityProviderConstants.DEF_RSA_KEY_SIZE;
             } else if ("DSA".equalsIgnoreCase(keyAlgName)) {
-                // hardcode for now as DEF_DSA_KEY_SIZE is still 1024
-                keysize = 2048; // SecurityProviderConstants.DEF_DSA_KEY_SIZE;
+                keysize = SecurityProviderConstants.DEF_DSA_KEY_SIZE;
             }
         }
 
--- a/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java	Thu Aug 24 19:18:51 2017 +0000
+++ b/src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java	Thu Aug 31 21:44:19 2017 +0000
@@ -64,7 +64,7 @@
     static {
         String keyLengthStr = GetPropertyAction.privilegedGetProperty
             (KEY_LENGTH_PROP);
-        int dsaKeySize = 1024;
+        int dsaKeySize = 2048;
         int rsaKeySize = 2048;
         int dhKeySize = 2048;
         int ecKeySize = 256;