diff options
author | nelson%bolyard.com <devnull@localhost> | 2007-05-10 01:12:21 +0000 |
---|---|---|
committer | nelson%bolyard.com <devnull@localhost> | 2007-05-10 01:12:21 +0000 |
commit | f801a4ccca18a85f99256b89ad45216998c72155 (patch) | |
tree | ea22a929011dff419dd674451b7a566eff6ad20a /security/nss | |
parent | bcac6b1af7b2b9fc876c9d853208049c7dcbe654 (diff) | |
download | nss-hg-f801a4ccca18a85f99256b89ad45216998c72155.tar.gz |
Bug 379753 ? S/MIME should support AES. r=rrelyea
Diffstat (limited to 'security/nss')
-rw-r--r-- | security/nss/lib/smime/smimeutil.c | 5 | ||||
-rw-r--r-- | security/nss/lib/util/ciferfam.h | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/security/nss/lib/smime/smimeutil.c b/security/nss/lib/smime/smimeutil.c index e7211280b..b2d848cea 100644 --- a/security/nss/lib/smime/smimeutil.c +++ b/security/nss/lib/smime/smimeutil.c @@ -152,6 +152,7 @@ static smime_cipher_map_entry smime_cipher_map[] = { { SMIME_RC2_CBC_64, SEC_OID_RC2_CBC, ¶m_int64, PR_TRUE, PR_TRUE }, { SMIME_RC2_CBC_128, SEC_OID_RC2_CBC, ¶m_int128, PR_TRUE, PR_TRUE }, { SMIME_DES_EDE3_168, SEC_OID_DES_EDE3_CBC, NULL, PR_TRUE, PR_TRUE }, + { SMIME_AES_CBC_128, SEC_OID_AES_128_CBC, NULL, PR_TRUE, PR_TRUE }, { SMIME_FORTEZZA, SEC_OID_FORTEZZA_SKIPJACK, NULL, PR_TRUE, PR_TRUE } }; static const int smime_cipher_map_count = sizeof(smime_cipher_map) / sizeof(smime_cipher_map_entry); @@ -269,6 +270,9 @@ nss_smime_get_cipher_for_alg_and_key(SECAlgorithmID *algid, PK11SymKey *key, uns case SEC_OID_DES_EDE3_CBC: c = SMIME_DES_EDE3_168; break; + case SEC_OID_AES_128_CBC: + c = SMIME_AES_CBC_128; + break; case SEC_OID_FORTEZZA_SKIPJACK: c = SMIME_FORTEZZA; break; @@ -532,6 +536,7 @@ smime_keysize_by_cipher (unsigned long which) keysize = 64; break; case SMIME_RC2_CBC_128: + case SMIME_AES_CBC_128: keysize = 128; break; case SMIME_DES_CBC_56: diff --git a/security/nss/lib/util/ciferfam.h b/security/nss/lib/util/ciferfam.h index 5fe8b18d7..1bff47121 100644 --- a/security/nss/lib/util/ciferfam.h +++ b/security/nss/lib/util/ciferfam.h @@ -62,7 +62,7 @@ /* * Note that it is assumed that the cipher number itself can be used * as a bit position in a mask, and that mask is currently 32 bits wide. - * So, if you want to add a cipher that is greater than 0033, secmime.c + * So, if you want to add a cipher that is greater than 0037, secmime.c * needs to be made smarter at the same time. */ #define SMIME_RC2_CBC_40 (CIPHER_FAMILYID_SMIME | 0001) @@ -70,6 +70,7 @@ #define SMIME_RC2_CBC_128 (CIPHER_FAMILYID_SMIME | 0003) #define SMIME_DES_CBC_56 (CIPHER_FAMILYID_SMIME | 0011) #define SMIME_DES_EDE3_168 (CIPHER_FAMILYID_SMIME | 0012) +#define SMIME_AES_CBC_128 (CIPHER_FAMILYID_SMIME | 0013) #define SMIME_RC5PAD_64_16_40 (CIPHER_FAMILYID_SMIME | 0021) #define SMIME_RC5PAD_64_16_64 (CIPHER_FAMILYID_SMIME | 0022) #define SMIME_RC5PAD_64_16_128 (CIPHER_FAMILYID_SMIME | 0023) |