jdk/src/share/classes/sun/security/krb5/EncryptionKey.java
changeset 23732 44fe768edfd2
parent 23010 6dadb192ad81
--- a/jdk/src/share/classes/sun/security/krb5/EncryptionKey.java	Wed Apr 09 17:08:37 2014 +0800
+++ b/jdk/src/share/classes/sun/security/krb5/EncryptionKey.java	Wed Apr 09 17:19:19 2014 +0800
@@ -271,15 +271,22 @@
                          String salt,
                          String algorithm) throws KrbCryptoException {
 
-        if (algorithm == null || algorithm.equalsIgnoreCase("DES")) {
+        if (algorithm == null || algorithm.equalsIgnoreCase("DES")
+                || algorithm.equalsIgnoreCase("des-cbc-md5")) {
             keyType = EncryptedData.ETYPE_DES_CBC_MD5;
-        } else if (algorithm.equalsIgnoreCase("DESede")) {
+        } else if (algorithm.equalsIgnoreCase("des-cbc-crc")) {
+            keyType = EncryptedData.ETYPE_DES_CBC_CRC;
+        } else if (algorithm.equalsIgnoreCase("DESede")
+                || algorithm.equalsIgnoreCase("des3-cbc-sha1-kd")) {
             keyType = EncryptedData.ETYPE_DES3_CBC_HMAC_SHA1_KD;
-        } else if (algorithm.equalsIgnoreCase("AES128")) {
+        } else if (algorithm.equalsIgnoreCase("AES128")
+                || algorithm.equalsIgnoreCase("aes128-cts-hmac-sha1-96")) {
             keyType = EncryptedData.ETYPE_AES128_CTS_HMAC_SHA1_96;
-        } else if (algorithm.equalsIgnoreCase("ArcFourHmac")) {
+        } else if (algorithm.equalsIgnoreCase("ArcFourHmac")
+                || algorithm.equalsIgnoreCase("rc4-hmac")) {
             keyType = EncryptedData.ETYPE_ARCFOUR_HMAC;
-        } else if (algorithm.equalsIgnoreCase("AES256")) {
+        } else if (algorithm.equalsIgnoreCase("AES256")
+                || algorithm.equalsIgnoreCase("aes256-cts-hmac-sha1-96")) {
             keyType = EncryptedData.ETYPE_AES256_CTS_HMAC_SHA1_96;
             // validate if AES256 is enabled
             if (!EType.isSupported(keyType)) {