bug 335021, incorrect smime_encryptionkeypref_template leads to QuickDER decoding failure MOZILLA_1_8_0_BRANCH FIREFOX_1_5_0_5_RC1 FIREFOX_1_5_0_5_RC2 FIREFOX_1_5_0_5_RC3 FIREFOX_1_5_0_5_RC4 FIREFOX_1_5_0_5_RC5 FIREFOX_1_5_0_5_RELEASE FIREFOX_1_5_0_6_RC1 FIREFOX_1_5_0_6_RELEASE FIREFOX_1_5_0_7_RC1 FIREFOX_1_5_0_7_RC2 MOZILLA_1_8_0_5_RC2 MOZILLA_1_8_0_5_RC4 MOZILLA_1_8_0_5_RC5 MOZILLA_1_8_0_5_RELEASE SEAMONKEY_1_0_3_RELEASE SEAMONKEY_1_0_4_RELEASE THUNDERBIRD_1_5_0_5_RC1 THUNDERBIRD_1_5_0_5_RC2 THUNDERBIRD_1_5_0_5_RC3 THUNDERBIRD_1_5_0_5_RC4 THUNDERBIRD_1_5_0_5_RELEASE THUNDERBIRD_1_5_0_7_RC1 XULRUNNER_1_8_0_5_RC2 XULRUNNER_1_8_0_5_RC4 XULRUNNER_1_8_0_5_RC5 XULRUNNER_1_8_0_5_RELEASE
authorkaie%kuix.de
Wed, 14 Jun 2006 13:29:35 +0000
branchMOZILLA_1_8_0_BRANCH
changeset 7201 6cccea315881fffb35cc622e8538a71319110331
parent 6918 eb94f74ce5c3dde95e1b0e9e52ae0ad81272e543
child 7343 df5fbf2179167994bf47208733e80eabe95391b2
push idunknown
push userunknown
push dateunknown
bugs335021, 332571
bug 335021, incorrect smime_encryptionkeypref_template leads to QuickDER decoding failure fixes bug 332571 can't encrypt e-mail message with valid certificate r=nelson, r=rrelyea, a=dveditz
security/nss/lib/smime/smimeutil.c
--- a/security/nss/lib/smime/smimeutil.c
+++ b/security/nss/lib/smime/smimeutil.c
@@ -111,25 +111,28 @@ typedef struct {
 } NSSSMIMEEncryptionKeyPreference;
 
 extern const SEC_ASN1Template NSSCMSRecipientKeyIdentifierTemplate[];
 
 static const SEC_ASN1Template smime_encryptionkeypref_template[] = {
     { SEC_ASN1_CHOICE,
 	  offsetof(NSSSMIMEEncryptionKeyPreference,selector), NULL,
 	  sizeof(NSSSMIMEEncryptionKeyPreference) },
-    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
+    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0
+          | SEC_ASN1_CONSTRUCTED,
 	  offsetof(NSSSMIMEEncryptionKeyPreference,id.issuerAndSN),
 	  SEC_ASN1_SUB(CERT_IssuerAndSNTemplate),
 	  NSSSMIMEEncryptionKeyPref_IssuerSN },
-    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | 1,
+    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | 1
+          | SEC_ASN1_CONSTRUCTED,
 	  offsetof(NSSSMIMEEncryptionKeyPreference,id.recipientKeyID),
 	  NSSCMSRecipientKeyIdentifierTemplate,
 	  NSSSMIMEEncryptionKeyPref_IssuerSN },
-    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 2,
+    { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 2
+          | SEC_ASN1_CONSTRUCTED,
 	  offsetof(NSSSMIMEEncryptionKeyPreference,id.subjectKeyID),
 	  SEC_ASN1_SUB(SEC_OctetStringTemplate),
 	  NSSSMIMEEncryptionKeyPref_SubjectKeyID },
     { 0, }
 };
 
 /* smime_cipher_map - map of SMIME symmetric "ciphers" to algtag & parameters */
 typedef struct {