Bug 644764, AES256 not recorded in SMIME capabilities, Patch contributed by Momcilo Majic, r=rrelyea
git-svn-id: svn://10.0.0.236/trunk@263507 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -37,7 +37,7 @@
|
||||
/*
|
||||
* Stuff specific to S/MIME policy and interoperability.
|
||||
*
|
||||
* $Id: smimeutil.c,v 1.22 2011-08-21 01:14:18 wtc%google.com Exp $
|
||||
* $Id: smimeutil.c,v 1.23 2012-03-01 18:33:11 kaie%kuix.de Exp $
|
||||
*/
|
||||
|
||||
#include "secmime.h"
|
||||
@@ -152,7 +152,8 @@ 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_AES_CBC_128, SEC_OID_AES_128_CBC, NULL, PR_TRUE, PR_TRUE },
|
||||
{ SMIME_AES_CBC_256, SEC_OID_AES_256_CBC, NULL, PR_TRUE, PR_TRUE }
|
||||
};
|
||||
static const int smime_cipher_map_count = sizeof(smime_cipher_map) / sizeof(smime_cipher_map_entry);
|
||||
|
||||
@@ -272,6 +273,9 @@ nss_smime_get_cipher_for_alg_and_key(SECAlgorithmID *algid, PK11SymKey *key, uns
|
||||
case SEC_OID_AES_128_CBC:
|
||||
c = SMIME_AES_CBC_128;
|
||||
break;
|
||||
case SEC_OID_AES_256_CBC:
|
||||
c = SMIME_AES_CBC_256;
|
||||
break;
|
||||
default:
|
||||
PORT_SetError(SEC_ERROR_INVALID_ALGORITHM);
|
||||
return SECFailure;
|
||||
@@ -526,6 +530,9 @@ smime_keysize_by_cipher (unsigned long which)
|
||||
case SMIME_AES_CBC_128:
|
||||
keysize = 128;
|
||||
break;
|
||||
case SMIME_AES_CBC_256:
|
||||
keysize = 256;
|
||||
break;
|
||||
case SMIME_DES_CBC_56:
|
||||
case SMIME_DES_EDE3_168:
|
||||
/*
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
* ciferfam.h - cipher familie IDs used for configuring ciphers for export
|
||||
* control
|
||||
*
|
||||
* $Id: ciferfam.h,v 1.4 2007-10-12 01:44:50 julien.pierre.boogz%sun.com Exp $
|
||||
* $Id: ciferfam.h,v 1.5 2012-03-01 18:33:11 kaie%kuix.de Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CIFERFAM_H_
|
||||
@@ -72,6 +72,7 @@
|
||||
#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_AES_CBC_256 (CIPHER_FAMILYID_SMIME | 0014)
|
||||
#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)
|
||||
|
||||
Reference in New Issue
Block a user