Bug 382292, Add support for Camellia cipher to symkeyutil
authorneil.williams%sun.com
Tue, 19 Jun 2007 01:18:41 +0000
changeset 7898 be2cf0bc52df260774b97fa92c17c26ceb9284b7
parent 7896 d498b10ebbaf2f24489794669054e29f79eb388f
child 7899 5352404e21ded20a144d484685057c0091bc133b
push idunknown
push userunknown
push dateunknown
bugs382292
Bug 382292, Add support for Camellia cipher to symkeyutil r=neil.williams
security/nss/cmd/symkeyutil/symkey.man
security/nss/cmd/symkeyutil/symkeyutil.c
--- a/security/nss/cmd/symkeyutil/symkey.man
+++ b/security/nss/cmd/symkeyutil/symkey.man
@@ -125,17 +125,17 @@ OPTIONS
                      operate on. In this case one andy only one of the -n, -i
                      or -j options should be specifed. 
 
    -t type           Specifies the key Type for the new key. This option is
                      required for the -K, -I, and -U commands. Valid values
                      are:
 			generic, rc2, rc4, des, des2, des3, cast, cast3,
                         cast5, cast128, rc5, idea, skipjack, baton, juniper,
-                        cdmf, aes
+                        cdmf, aes, camellia
 
                      Not all tokens support all key types. The generic key
                      type is usually used in MACing and key derivation 
                      algorithms. Neither generic nor rc4 keys may be used
                      to wrap other keys. Fixed rc4 keys are dangerous since
                      multiple use of the same stream cipher key to encrypted
                      different data can compromise all data encrypted with
                      that key.
--- a/security/nss/cmd/symkeyutil/symkeyutil.c
+++ b/security/nss/cmd/symkeyutil/symkeyutil.c
@@ -98,16 +98,17 @@ static KeyTypes keyArray[] = {
     { CKK_CAST128, CKM_CAST128_CBC, CKM_CAST128_ECB, "cast128" },
     { CKK_RC5, CKM_RC5_CBC, CKM_RC5_ECB, "rc5" },
     { CKK_IDEA, CKM_IDEA_CBC, CKM_IDEA_ECB, "idea" },
     { CKK_SKIPJACK, CKM_SKIPJACK_CBC64, CKM_SKIPJACK_WRAP, "skipjack" },
     { CKK_BATON, CKM_BATON_CBC128, CKM_BATON_WRAP, "baton" },
     { CKK_JUNIPER, CKM_JUNIPER_CBC128, CKM_JUNIPER_WRAP, "juniper" },
     { CKK_CDMF, CKM_CDMF_CBC, CKM_CDMF_ECB, "cdmf" },
     { CKK_AES, CKM_AES_CBC, CKM_AES_ECB, "aes" },
+    { CKK_CAMELLIA, CKM_CAMELLIA_CBC, CKM_CAMELLIA_ECB, "camellia" },
 };
 
 static int keyArraySize = sizeof(keyArray)/sizeof(keyArray[0]);
 
 int
 GetLen(PRFileDesc* fd)
 {
     PRFileInfo info;