equal
deleted
inserted
replaced
72 import sun.security.pkcs10.PKCS10; |
72 import sun.security.pkcs10.PKCS10; |
73 import sun.security.pkcs10.PKCS10Attribute; |
73 import sun.security.pkcs10.PKCS10Attribute; |
74 import sun.security.provider.X509Factory; |
74 import sun.security.provider.X509Factory; |
75 import sun.security.provider.certpath.ssl.SSLServerCertStore; |
75 import sun.security.provider.certpath.ssl.SSLServerCertStore; |
76 import sun.security.util.Password; |
76 import sun.security.util.Password; |
|
77 import sun.security.util.SecurityProviderConstants; |
77 import javax.crypto.KeyGenerator; |
78 import javax.crypto.KeyGenerator; |
78 import javax.crypto.SecretKey; |
79 import javax.crypto.SecretKey; |
79 import javax.crypto.SecretKeyFactory; |
80 import javax.crypto.SecretKeyFactory; |
80 import javax.crypto.spec.PBEKeySpec; |
81 import javax.crypto.spec.PBEKeySpec; |
81 |
82 |
1815 int keysize, String sigAlgName) |
1816 int keysize, String sigAlgName) |
1816 throws Exception |
1817 throws Exception |
1817 { |
1818 { |
1818 if (keysize == -1) { |
1819 if (keysize == -1) { |
1819 if ("EC".equalsIgnoreCase(keyAlgName)) { |
1820 if ("EC".equalsIgnoreCase(keyAlgName)) { |
1820 keysize = 256; |
1821 keysize = SecurityProviderConstants.DEF_EC_KEY_SIZE; |
1821 } else { |
1822 } else if ("RSA".equalsIgnoreCase(keyAlgName)) { |
1822 keysize = 2048; // RSA and DSA |
1823 keysize = SecurityProviderConstants.DEF_RSA_KEY_SIZE; |
|
1824 } else if ("DSA".equalsIgnoreCase(keyAlgName)) { |
|
1825 // hardcode for now as DEF_DSA_KEY_SIZE is still 1024 |
|
1826 keysize = 2048; // SecurityProviderConstants.DEF_DSA_KEY_SIZE; |
1823 } |
1827 } |
1824 } |
1828 } |
1825 |
1829 |
1826 if (alias == null) { |
1830 if (alias == null) { |
1827 alias = keyAlias; |
1831 alias = keyAlias; |