- Fix cms header to not use c++ reserved word (#676036)
- Reenable patches for bug 499444
This commit is contained in:
parent
40064d5204
commit
cab275f8b6
455
dont-use-cpp-reserved-word.patch
Normal file
455
dont-use-cpp-reserved-word.patch
Normal file
@ -0,0 +1,455 @@
|
||||
Index: ./mozilla/security/nss/lib/smime/cmscinfo.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmscinfo.c,v
|
||||
retrieving revision 1.7.192.2
|
||||
diff -u -p -r1.7.192.2 cmscinfo.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmscinfo.c 1 Feb 2011 00:33:23 -0000 1.7.192.2
|
||||
+++ ./mozilla/security/nss/lib/smime/cmscinfo.c 8 Feb 2011 17:12:24 -0000
|
||||
@@ -56,27 +56,27 @@
|
||||
SECStatus
|
||||
NSS_CMSContentInfo_Private_Init(NSSCMSContentInfo *cinfo)
|
||||
{
|
||||
- if (cinfo->private) {
|
||||
+ if (cinfo->privateInfo) {
|
||||
return SECSuccess;
|
||||
}
|
||||
- cinfo->private = PORT_ZNew(NSSCMSContentInfoPrivate);
|
||||
- return (cinfo->private) ? SECSuccess: SECFailure;
|
||||
+ cinfo->privateInfo = PORT_ZNew(NSSCMSContentInfoPrivate);
|
||||
+ return (cinfo->privateInfo) ? SECSuccess: SECFailure;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
-nss_cmsContentInfo_private_destroy(NSSCMSContentInfoPrivate *private)
|
||||
+nss_cmsContentInfo_private_destroy(NSSCMSContentInfoPrivate *privateInfo)
|
||||
{
|
||||
- if (private->digcx) {
|
||||
+ if (privateInfo->digcx) {
|
||||
/* must destroy digest objects */
|
||||
- NSS_CMSDigestContext_Cancel(private->digcx);
|
||||
- private->digcx = NULL;
|
||||
+ NSS_CMSDigestContext_Cancel(privateInfo->digcx);
|
||||
+ privateInfo->digcx = NULL;
|
||||
}
|
||||
- if (private->ciphcx) {
|
||||
- NSS_CMSCipherContext_Destroy(private->ciphcx);
|
||||
- private->ciphcx = NULL;
|
||||
+ if (privateInfo->ciphcx) {
|
||||
+ NSS_CMSCipherContext_Destroy(privateInfo->ciphcx);
|
||||
+ privateInfo->ciphcx = NULL;
|
||||
}
|
||||
- PORT_Free(private);
|
||||
+ PORT_Free(privateInfo);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -106,9 +106,9 @@ NSS_CMSContentInfo_Destroy(NSSCMSContent
|
||||
/* XXX Anything else that needs to be "manually" freed/destroyed? */
|
||||
break;
|
||||
}
|
||||
- if (cinfo->private) {
|
||||
- nss_cmsContentInfo_private_destroy(cinfo->private);
|
||||
- cinfo->private = NULL;
|
||||
+ if (cinfo->privateInfo) {
|
||||
+ nss_cmsContentInfo_private_destroy(cinfo->privateInfo);
|
||||
+ cinfo->privateInfo = NULL;
|
||||
}
|
||||
if (cinfo->bulkkey) {
|
||||
PK11_FreeSymKey(cinfo->bulkkey);
|
||||
@@ -153,7 +153,7 @@ NSS_CMSContentInfo_GetChildContentInfo(N
|
||||
}
|
||||
break;
|
||||
}
|
||||
- if (ccinfo && !ccinfo->private) {
|
||||
+ if (ccinfo && !ccinfo->privateInfo) {
|
||||
NSS_CMSContentInfo_Private_Init(ccinfo);
|
||||
}
|
||||
return ccinfo;
|
||||
@@ -169,7 +169,7 @@ NSS_CMSContentInfo_SetDontStream(NSSCMSC
|
||||
/* default is streaming, failure to get ccinfo will not effect this */
|
||||
return dontStream ? SECFailure : SECSuccess ;
|
||||
}
|
||||
- cinfo->private->dontStream = dontStream;
|
||||
+ cinfo->privateInfo->dontStream = dontStream;
|
||||
return SECSuccess;
|
||||
}
|
||||
|
||||
Index: ./mozilla/security/nss/lib/smime/cmsdecode.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmsdecode.c,v
|
||||
retrieving revision 1.9.66.2
|
||||
diff -u -p -r1.9.66.2 cmsdecode.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmsdecode.c 28 Jan 2011 23:08:27 -0000 1.9.66.2
|
||||
+++ ./mozilla/security/nss/lib/smime/cmsdecode.c 8 Feb 2011 17:12:24 -0000
|
||||
@@ -455,7 +455,7 @@ nss_cms_decoder_work_data(NSSCMSDecoderC
|
||||
goto loser;
|
||||
}
|
||||
|
||||
- if (cinfo->private && cinfo->private->ciphcx != NULL) {
|
||||
+ if (cinfo->privateInfo && cinfo->privateInfo->ciphcx != NULL) {
|
||||
/*
|
||||
* we are decrypting.
|
||||
*
|
||||
@@ -469,7 +469,7 @@ nss_cms_decoder_work_data(NSSCMSDecoderC
|
||||
unsigned int buflen; /* length available for decrypted data */
|
||||
|
||||
/* find out about the length of decrypted data */
|
||||
- buflen = NSS_CMSCipherContext_DecryptLength(cinfo->private->ciphcx, len, final);
|
||||
+ buflen = NSS_CMSCipherContext_DecryptLength(cinfo->privateInfo->ciphcx, len, final);
|
||||
|
||||
/*
|
||||
* it might happen that we did not provide enough data for a full
|
||||
@@ -500,7 +500,7 @@ nss_cms_decoder_work_data(NSSCMSDecoderC
|
||||
* any output (see above), but we still need to call NSS_CMSCipherContext_Decrypt to
|
||||
* keep track of incoming data
|
||||
*/
|
||||
- rv = NSS_CMSCipherContext_Decrypt(cinfo->private->ciphcx, buf, &outlen, buflen,
|
||||
+ rv = NSS_CMSCipherContext_Decrypt(cinfo->privateInfo->ciphcx, buf, &outlen, buflen,
|
||||
data, len, final);
|
||||
if (rv != SECSuccess) {
|
||||
p7dcx->error = PORT_GetError();
|
||||
@@ -520,8 +520,8 @@ nss_cms_decoder_work_data(NSSCMSDecoderC
|
||||
/*
|
||||
* Update the running digests with plaintext bytes (if we need to).
|
||||
*/
|
||||
- if (cinfo->private && cinfo->private->digcx)
|
||||
- NSS_CMSDigestContext_Update(cinfo->private->digcx, data, len);
|
||||
+ if (cinfo->privateInfo && cinfo->privateInfo->digcx)
|
||||
+ NSS_CMSDigestContext_Update(cinfo->privateInfo->digcx, data, len);
|
||||
|
||||
/* at this point, we have the plain decoded & decrypted data
|
||||
** which is either more encoded DER (which we need to hand to the child
|
||||
Index: ./mozilla/security/nss/lib/smime/cmsdigdata.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmsdigdata.c,v
|
||||
retrieving revision 1.5.192.1
|
||||
diff -u -p -r1.5.192.1 cmsdigdata.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmsdigdata.c 28 Jan 2011 23:08:27 -0000 1.5.192.1
|
||||
+++ ./mozilla/security/nss/lib/smime/cmsdigdata.c 8 Feb 2011 17:12:25 -0000
|
||||
@@ -143,8 +143,8 @@ NSS_CMSDigestedData_Encode_BeforeData(NS
|
||||
/* set up the digests */
|
||||
if (digd->digestAlg.algorithm.len != 0 && digd->digest.len == 0) {
|
||||
/* if digest is already there, do nothing */
|
||||
- digd->contentInfo.private->digcx = NSS_CMSDigestContext_StartSingle(&(digd->digestAlg));
|
||||
- if (digd->contentInfo.private->digcx == NULL)
|
||||
+ digd->contentInfo.privateInfo->digcx = NSS_CMSDigestContext_StartSingle(&(digd->digestAlg));
|
||||
+ if (digd->contentInfo.privateInfo->digcx == NULL)
|
||||
return SECFailure;
|
||||
}
|
||||
return SECSuccess;
|
||||
@@ -162,12 +162,12 @@ NSS_CMSDigestedData_Encode_AfterData(NSS
|
||||
{
|
||||
SECStatus rv = SECSuccess;
|
||||
/* did we have digest calculation going on? */
|
||||
- if (digd->contentInfo.private && digd->contentInfo.private->digcx) {
|
||||
- rv = NSS_CMSDigestContext_FinishSingle(digd->contentInfo.private->digcx,
|
||||
+ if (digd->contentInfo.privateInfo && digd->contentInfo.privateInfo->digcx) {
|
||||
+ rv = NSS_CMSDigestContext_FinishSingle(digd->contentInfo.privateInfo->digcx,
|
||||
digd->cmsg->poolp,
|
||||
&(digd->digest));
|
||||
/* error has been set by NSS_CMSDigestContext_FinishSingle */
|
||||
- digd->contentInfo.private->digcx = NULL;
|
||||
+ digd->contentInfo.privateInfo->digcx = NULL;
|
||||
}
|
||||
|
||||
return rv;
|
||||
@@ -194,8 +194,8 @@ NSS_CMSDigestedData_Decode_BeforeData(NS
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
- digd->contentInfo.private->digcx = NSS_CMSDigestContext_StartSingle(&(digd->digestAlg));
|
||||
- if (digd->contentInfo.private->digcx == NULL)
|
||||
+ digd->contentInfo.privateInfo->digcx = NSS_CMSDigestContext_StartSingle(&(digd->digestAlg));
|
||||
+ if (digd->contentInfo.privateInfo->digcx == NULL)
|
||||
return SECFailure;
|
||||
|
||||
return SECSuccess;
|
||||
@@ -213,12 +213,12 @@ NSS_CMSDigestedData_Decode_AfterData(NSS
|
||||
{
|
||||
SECStatus rv = SECSuccess;
|
||||
/* did we have digest calculation going on? */
|
||||
- if (digd->contentInfo.private && digd->contentInfo.private->digcx) {
|
||||
- rv = NSS_CMSDigestContext_FinishSingle(digd->contentInfo.private->digcx,
|
||||
+ if (digd->contentInfo.privateInfo && digd->contentInfo.privateInfo->digcx) {
|
||||
+ rv = NSS_CMSDigestContext_FinishSingle(digd->contentInfo.privateInfo->digcx,
|
||||
digd->cmsg->poolp,
|
||||
&(digd->cdigest));
|
||||
/* error has been set by NSS_CMSDigestContext_FinishSingle */
|
||||
- digd->contentInfo.private->digcx = NULL;
|
||||
+ digd->contentInfo.privateInfo->digcx = NULL;
|
||||
}
|
||||
|
||||
return rv;
|
||||
Index: ./mozilla/security/nss/lib/smime/cmsencdata.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmsencdata.c,v
|
||||
retrieving revision 1.11.56.1
|
||||
diff -u -p -r1.11.56.1 cmsencdata.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmsencdata.c 28 Jan 2011 23:08:27 -0000 1.11.56.1
|
||||
+++ ./mozilla/security/nss/lib/smime/cmsencdata.c 8 Feb 2011 17:12:25 -0000
|
||||
@@ -200,9 +200,9 @@ NSS_CMSEncryptedData_Encode_BeforeData(N
|
||||
/* this may modify algid (with IVs generated in a token).
|
||||
* it is therefore essential that algid is a pointer to the "real" contentEncAlg,
|
||||
* not just to a copy */
|
||||
- cinfo->private->ciphcx = NSS_CMSCipherContext_StartEncrypt(encd->cmsg->poolp, bulkkey, algid);
|
||||
+ cinfo->privateInfo->ciphcx = NSS_CMSCipherContext_StartEncrypt(encd->cmsg->poolp, bulkkey, algid);
|
||||
PK11_FreeSymKey(bulkkey);
|
||||
- if (cinfo->private->ciphcx == NULL)
|
||||
+ if (cinfo->privateInfo->ciphcx == NULL)
|
||||
return SECFailure;
|
||||
|
||||
return SECSuccess;
|
||||
@@ -214,9 +214,9 @@ NSS_CMSEncryptedData_Encode_BeforeData(N
|
||||
SECStatus
|
||||
NSS_CMSEncryptedData_Encode_AfterData(NSSCMSEncryptedData *encd)
|
||||
{
|
||||
- if (encd->contentInfo.private && encd->contentInfo.private->ciphcx) {
|
||||
- NSS_CMSCipherContext_Destroy(encd->contentInfo.private->ciphcx);
|
||||
- encd->contentInfo.private->ciphcx = NULL;
|
||||
+ if (encd->contentInfo.privateInfo && encd->contentInfo.privateInfo->ciphcx) {
|
||||
+ NSS_CMSCipherContext_Destroy(encd->contentInfo.privateInfo->ciphcx);
|
||||
+ encd->contentInfo.privateInfo->ciphcx = NULL;
|
||||
}
|
||||
|
||||
/* nothing to do after data */
|
||||
@@ -255,8 +255,8 @@ NSS_CMSEncryptedData_Decode_BeforeData(N
|
||||
}
|
||||
rv = SECFailure;
|
||||
|
||||
- cinfo->private->ciphcx = NSS_CMSCipherContext_StartDecrypt(bulkkey, bulkalg);
|
||||
- if (cinfo->private->ciphcx == NULL)
|
||||
+ cinfo->privateInfo->ciphcx = NSS_CMSCipherContext_StartDecrypt(bulkkey, bulkalg);
|
||||
+ if (cinfo->privateInfo->ciphcx == NULL)
|
||||
goto loser; /* error has been set by NSS_CMSCipherContext_StartDecrypt */
|
||||
|
||||
|
||||
@@ -275,9 +275,9 @@ loser:
|
||||
SECStatus
|
||||
NSS_CMSEncryptedData_Decode_AfterData(NSSCMSEncryptedData *encd)
|
||||
{
|
||||
- if (encd->contentInfo.private && encd->contentInfo.private->ciphcx) {
|
||||
- NSS_CMSCipherContext_Destroy(encd->contentInfo.private->ciphcx);
|
||||
- encd->contentInfo.private->ciphcx = NULL;
|
||||
+ if (encd->contentInfo.privateInfo && encd->contentInfo.privateInfo->ciphcx) {
|
||||
+ NSS_CMSCipherContext_Destroy(encd->contentInfo.privateInfo->ciphcx);
|
||||
+ encd->contentInfo.privateInfo->ciphcx = NULL;
|
||||
}
|
||||
|
||||
return SECSuccess;
|
||||
Index: ./mozilla/security/nss/lib/smime/cmsencode.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmsencode.c,v
|
||||
retrieving revision 1.6.66.4
|
||||
diff -u -p -r1.6.66.4 cmsencode.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmsencode.c 1 Feb 2011 23:27:20 -0000 1.6.66.4
|
||||
+++ ./mozilla/security/nss/lib/smime/cmsencode.c 8 Feb 2011 17:12:25 -0000
|
||||
@@ -332,7 +332,7 @@ nss_cms_before_data(NSSCMSEncoderContext
|
||||
* Indicate that we are streaming. We will be streaming until we
|
||||
* get past the contents bytes.
|
||||
*/
|
||||
- if (!cinfo->private || !cinfo->private->dontStream)
|
||||
+ if (!cinfo->privateInfo || !cinfo->privateInfo->dontStream)
|
||||
SEC_ASN1EncoderSetStreaming(childp7ecx->ecx);
|
||||
|
||||
/*
|
||||
@@ -430,23 +430,23 @@ nss_cms_encoder_work_data(NSSCMSEncoderC
|
||||
}
|
||||
|
||||
/* Update the running digest. */
|
||||
- if (len && cinfo->private && cinfo->private->digcx != NULL)
|
||||
- NSS_CMSDigestContext_Update(cinfo->private->digcx, data, len);
|
||||
+ if (len && cinfo->privateInfo && cinfo->privateInfo->digcx != NULL)
|
||||
+ NSS_CMSDigestContext_Update(cinfo->privateInfo->digcx, data, len);
|
||||
|
||||
/* Encrypt this chunk. */
|
||||
- if (cinfo->private && cinfo->private->ciphcx != NULL) {
|
||||
+ if (cinfo->privateInfo && cinfo->privateInfo->ciphcx != NULL) {
|
||||
unsigned int inlen; /* length of data being encrypted */
|
||||
unsigned int outlen; /* length of encrypted data */
|
||||
unsigned int buflen; /* length available for encrypted data */
|
||||
|
||||
inlen = len;
|
||||
- buflen = NSS_CMSCipherContext_EncryptLength(cinfo->private->ciphcx, inlen, final);
|
||||
+ buflen = NSS_CMSCipherContext_EncryptLength(cinfo->privateInfo->ciphcx, inlen, final);
|
||||
if (buflen == 0) {
|
||||
/*
|
||||
* No output is expected, but the input data may be buffered
|
||||
* so we still have to call Encrypt.
|
||||
*/
|
||||
- rv = NSS_CMSCipherContext_Encrypt(cinfo->private->ciphcx, NULL, NULL, 0,
|
||||
+ rv = NSS_CMSCipherContext_Encrypt(cinfo->privateInfo->ciphcx, NULL, NULL, 0,
|
||||
data, inlen, final);
|
||||
if (final) {
|
||||
len = 0;
|
||||
@@ -463,7 +463,7 @@ nss_cms_encoder_work_data(NSSCMSEncoderC
|
||||
if (buf == NULL) {
|
||||
rv = SECFailure;
|
||||
} else {
|
||||
- rv = NSS_CMSCipherContext_Encrypt(cinfo->private->ciphcx, buf, &outlen, buflen,
|
||||
+ rv = NSS_CMSCipherContext_Encrypt(cinfo->privateInfo->ciphcx, buf, &outlen, buflen,
|
||||
data, inlen, final);
|
||||
data = buf;
|
||||
len = outlen;
|
||||
@@ -484,7 +484,7 @@ nss_cms_encoder_work_data(NSSCMSEncoderC
|
||||
|
||||
done:
|
||||
|
||||
- if (cinfo->private && cinfo->private->ciphcx != NULL) {
|
||||
+ if (cinfo->privateInfo && cinfo->privateInfo->ciphcx != NULL) {
|
||||
if (dest != NULL) {
|
||||
dest->data = buf;
|
||||
dest->len = len;
|
||||
@@ -592,7 +592,7 @@ NSS_CMSEncoder_Start(NSSCMSMessage *cmsg
|
||||
* Indicate that we are streaming. We will be streaming until we
|
||||
* get past the contents bytes.
|
||||
*/
|
||||
- if (!cinfo->private || !cinfo->private->dontStream)
|
||||
+ if (!cinfo->privateInfo || !cinfo->privateInfo->dontStream)
|
||||
SEC_ASN1EncoderSetStreaming(p7ecx->ecx);
|
||||
|
||||
/*
|
||||
Index: ./mozilla/security/nss/lib/smime/cmsenvdata.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmsenvdata.c,v
|
||||
retrieving revision 1.11.142.1
|
||||
diff -u -p -r1.11.142.1 cmsenvdata.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmsenvdata.c 28 Jan 2011 23:08:27 -0000 1.11.142.1
|
||||
+++ ./mozilla/security/nss/lib/smime/cmsenvdata.c 8 Feb 2011 17:12:26 -0000
|
||||
@@ -289,9 +289,9 @@ NSS_CMSEnvelopedData_Encode_BeforeData(N
|
||||
/* this may modify algid (with IVs generated in a token).
|
||||
* it is essential that algid is a pointer to the contentEncAlg data, not a
|
||||
* pointer to a copy! */
|
||||
- cinfo->private->ciphcx = NSS_CMSCipherContext_StartEncrypt(envd->cmsg->poolp, bulkkey, algid);
|
||||
+ cinfo->privateInfo->ciphcx = NSS_CMSCipherContext_StartEncrypt(envd->cmsg->poolp, bulkkey, algid);
|
||||
PK11_FreeSymKey(bulkkey);
|
||||
- if (cinfo->private->ciphcx == NULL)
|
||||
+ if (cinfo->privateInfo->ciphcx == NULL)
|
||||
return SECFailure;
|
||||
|
||||
return SECSuccess;
|
||||
@@ -303,9 +303,9 @@ NSS_CMSEnvelopedData_Encode_BeforeData(N
|
||||
SECStatus
|
||||
NSS_CMSEnvelopedData_Encode_AfterData(NSSCMSEnvelopedData *envd)
|
||||
{
|
||||
- if (envd->contentInfo.private && envd->contentInfo.private->ciphcx) {
|
||||
- NSS_CMSCipherContext_Destroy(envd->contentInfo.private->ciphcx);
|
||||
- envd->contentInfo.private->ciphcx = NULL;
|
||||
+ if (envd->contentInfo.privateInfo && envd->contentInfo.privateInfo->ciphcx) {
|
||||
+ NSS_CMSCipherContext_Destroy(envd->contentInfo.privateInfo->ciphcx);
|
||||
+ envd->contentInfo.privateInfo->ciphcx = NULL;
|
||||
}
|
||||
|
||||
/* nothing else to do after data */
|
||||
@@ -338,7 +338,7 @@ NSS_CMSEnvelopedData_Decode_BeforeData(N
|
||||
}
|
||||
|
||||
/* look if one of OUR cert's issuerSN is on the list of recipients, and if so, */
|
||||
- /* get the cert and private key for it right away */
|
||||
+ /* get the cert and privateInfo key for it right away */
|
||||
recipient_list = nss_cms_recipient_list_create(envd->recipientInfos);
|
||||
if (recipient_list == NULL)
|
||||
goto loser;
|
||||
@@ -390,8 +390,8 @@ NSS_CMSEnvelopedData_Decode_BeforeData(N
|
||||
goto loser;
|
||||
}
|
||||
rv = SECFailure;
|
||||
- cinfo->private->ciphcx = NSS_CMSCipherContext_StartDecrypt(bulkkey, bulkalg);
|
||||
- if (cinfo->private->ciphcx == NULL)
|
||||
+ cinfo->privateInfo->ciphcx = NSS_CMSCipherContext_StartDecrypt(bulkkey, bulkalg);
|
||||
+ if (cinfo->privateInfo->ciphcx == NULL)
|
||||
goto loser; /* error has been set by NSS_CMSCipherContext_StartDecrypt */
|
||||
|
||||
|
||||
@@ -411,9 +411,9 @@ loser:
|
||||
SECStatus
|
||||
NSS_CMSEnvelopedData_Decode_AfterData(NSSCMSEnvelopedData *envd)
|
||||
{
|
||||
- if (envd && envd->contentInfo.private && envd->contentInfo.private->ciphcx) {
|
||||
- NSS_CMSCipherContext_Destroy(envd->contentInfo.private->ciphcx);
|
||||
- envd->contentInfo.private->ciphcx = NULL;
|
||||
+ if (envd && envd->contentInfo.privateInfo && envd->contentInfo.privateInfo->ciphcx) {
|
||||
+ NSS_CMSCipherContext_Destroy(envd->contentInfo.privateInfo->ciphcx);
|
||||
+ envd->contentInfo.privateInfo->ciphcx = NULL;
|
||||
}
|
||||
|
||||
return SECSuccess;
|
||||
Index: ./mozilla/security/nss/lib/smime/cmssigdata.c
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmssigdata.c,v
|
||||
retrieving revision 1.29.142.1
|
||||
diff -u -p -r1.29.142.1 cmssigdata.c
|
||||
--- ./mozilla/security/nss/lib/smime/cmssigdata.c 28 Jan 2011 23:08:27 -0000 1.29.142.1
|
||||
+++ ./mozilla/security/nss/lib/smime/cmssigdata.c 8 Feb 2011 17:12:26 -0000
|
||||
@@ -228,11 +228,11 @@ NSS_CMSSignedData_Encode_BeforeData(NSSC
|
||||
}
|
||||
/* set up the digests */
|
||||
if (sigd->digests && sigd->digests[0]) {
|
||||
- sigd->contentInfo.private->digcx = NULL; /* don't attempt to make new ones. */
|
||||
+ sigd->contentInfo.privateInfo->digcx = NULL; /* don't attempt to make new ones. */
|
||||
} else if (sigd->digestAlgorithms != NULL) {
|
||||
- sigd->contentInfo.private->digcx =
|
||||
+ sigd->contentInfo.privateInfo->digcx =
|
||||
NSS_CMSDigestContext_StartMultiple(sigd->digestAlgorithms);
|
||||
- if (sigd->contentInfo.private->digcx == NULL)
|
||||
+ if (sigd->contentInfo.privateInfo->digcx == NULL)
|
||||
return SECFailure;
|
||||
}
|
||||
return SECSuccess;
|
||||
@@ -272,11 +272,11 @@ NSS_CMSSignedData_Encode_AfterData(NSSCM
|
||||
cinfo = &(sigd->contentInfo);
|
||||
|
||||
/* did we have digest calculation going on? */
|
||||
- if (cinfo->private && cinfo->private->digcx) {
|
||||
- rv = NSS_CMSDigestContext_FinishMultiple(cinfo->private->digcx, poolp,
|
||||
+ if (cinfo->privateInfo && cinfo->privateInfo->digcx) {
|
||||
+ rv = NSS_CMSDigestContext_FinishMultiple(cinfo->privateInfo->digcx, poolp,
|
||||
&(sigd->digests));
|
||||
/* error has been set by NSS_CMSDigestContext_FinishMultiple */
|
||||
- cinfo->private->digcx = NULL;
|
||||
+ cinfo->privateInfo->digcx = NULL;
|
||||
if (rv != SECSuccess)
|
||||
goto loser;
|
||||
}
|
||||
@@ -409,8 +409,8 @@ NSS_CMSSignedData_Decode_BeforeData(NSSC
|
||||
/* set up the digests */
|
||||
if (sigd->digestAlgorithms != NULL && sigd->digests == NULL) {
|
||||
/* if digests are already there, do nothing */
|
||||
- sigd->contentInfo.private->digcx = NSS_CMSDigestContext_StartMultiple(sigd->digestAlgorithms);
|
||||
- if (sigd->contentInfo.private->digcx == NULL)
|
||||
+ sigd->contentInfo.privateInfo->digcx = NSS_CMSDigestContext_StartMultiple(sigd->digestAlgorithms);
|
||||
+ if (sigd->contentInfo.privateInfo->digcx == NULL)
|
||||
return SECFailure;
|
||||
}
|
||||
return SECSuccess;
|
||||
@@ -431,11 +431,11 @@ NSS_CMSSignedData_Decode_AfterData(NSSCM
|
||||
}
|
||||
|
||||
/* did we have digest calculation going on? */
|
||||
- if (sigd->contentInfo.private && sigd->contentInfo.private->digcx) {
|
||||
- rv = NSS_CMSDigestContext_FinishMultiple(sigd->contentInfo.private->digcx,
|
||||
+ if (sigd->contentInfo.privateInfo && sigd->contentInfo.privateInfo->digcx) {
|
||||
+ rv = NSS_CMSDigestContext_FinishMultiple(sigd->contentInfo.privateInfo->digcx,
|
||||
sigd->cmsg->poolp, &(sigd->digests));
|
||||
/* error set by NSS_CMSDigestContext_FinishMultiple */
|
||||
- sigd->contentInfo.private->digcx = NULL;
|
||||
+ sigd->contentInfo.privateInfo->digcx = NULL;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
Index: ./mozilla/security/nss/lib/smime/cmst.h
|
||||
===================================================================
|
||||
RCS file: /cvsroot/mozilla/security/nss/lib/smime/cmst.h,v
|
||||
retrieving revision 1.10.142.2
|
||||
diff -u -p -r1.10.142.2 cmst.h
|
||||
--- ./mozilla/security/nss/lib/smime/cmst.h 1 Feb 2011 00:33:23 -0000 1.10.142.2
|
||||
+++ ./mozilla/security/nss/lib/smime/cmst.h 8 Feb 2011 17:12:26 -0000
|
||||
@@ -182,7 +182,7 @@ struct NSSCMSContentInfoStr {
|
||||
* (only used by creation code) */
|
||||
SECOidTag contentEncAlgTag; /* oid tag of encryption algorithm
|
||||
* (only used by creation code) */
|
||||
- NSSCMSContentInfoPrivate *private; /* place for NSS private info */
|
||||
+ NSSCMSContentInfoPrivate *privateInfo; /* place for NSS private info */
|
||||
void *reserved; /* keep binary compatibility */
|
||||
};
|
||||
|
12
nss.spec
12
nss.spec
@ -6,7 +6,7 @@
|
||||
Summary: Network Security Services
|
||||
Name: nss
|
||||
Version: 3.12.9
|
||||
Release: 6%{?dist}
|
||||
Release: 7%{?dist}
|
||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||
URL: http://www.mozilla.org/projects/security/pki/nss/
|
||||
Group: System Environment/Libraries
|
||||
@ -45,6 +45,7 @@ Patch7: nsspem-642433.patch
|
||||
Patch11: honor-user-trust-preferences.patch
|
||||
Patch12: allow-content-types-beyond-smime.patch
|
||||
Patch13: nss-recurse.patch
|
||||
Patch14: dont-use-cpp-reserved-word.patch
|
||||
|
||||
%description
|
||||
Network Security Services (NSS) is a set of libraries designed to
|
||||
@ -117,8 +118,9 @@ low level services.
|
||||
%patch6 -p0 -b .libpem
|
||||
%patch7 -p0 -b .642433
|
||||
%patch11 -p1 -b .643134
|
||||
#%patch12 -p1 -b .contenttypes
|
||||
#%patch13 -p1 -b .recurse
|
||||
%patch12 -p1 -b .contenttypes
|
||||
%patch13 -p1 -b .recurse
|
||||
%patch14 -p1 -b .676036
|
||||
|
||||
|
||||
%build
|
||||
@ -495,6 +497,10 @@ rm -rf $RPM_BUILD_ROOT/%{_includedir}/nss3/nsslowhash.h
|
||||
%{_libdir}/libnssckfw.a
|
||||
|
||||
%changelog
|
||||
* Tue Feb 08 2011 Elio Maldonado <emaldona@redhat.com> - 3.12.9-7
|
||||
- Fix cms header to not use c++ reserved word (#676036)
|
||||
- Reenable patches for bug 499444
|
||||
|
||||
* Tue Feb 08 2011 Christopher Aillon <caillon@redhat.com> - 3.12.9-6
|
||||
- Revert patches for 499444 as they use a C++ reserved word and
|
||||
cause compilation of Firefox to fail
|
||||
|
Loading…
Reference in New Issue
Block a user