зеркало из https://github.com/mozilla/gecko-dev.git
Bugzilla bug 226861: removed NSS_CMSSignedData_GetDigestByAlgTag, which is
a duplicate of NSS_CMSSignedData_GetDigestValue. r=nelsonb. Modified Files: cms.h cmssigdata.c
This commit is contained in:
Родитель
3c6bc17197
Коммит
dcc1fa5880
|
@ -34,7 +34,7 @@
|
||||||
/*
|
/*
|
||||||
* Interfaces of the CMS implementation.
|
* Interfaces of the CMS implementation.
|
||||||
*
|
*
|
||||||
* $Id: cms.h,v 1.17 2003/03/11 03:38:53 jpierre%netscape.com Exp $
|
* $Id: cms.h,v 1.18 2003/11/26 23:50:02 wchang0222%aol.com Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _CMS_H_
|
#ifndef _CMS_H_
|
||||||
|
@ -563,9 +563,6 @@ extern SECStatus
|
||||||
NSS_CMSSignedData_AddSignerInfo(NSSCMSSignedData *sigd,
|
NSS_CMSSignedData_AddSignerInfo(NSSCMSSignedData *sigd,
|
||||||
NSSCMSSignerInfo *signerinfo);
|
NSSCMSSignerInfo *signerinfo);
|
||||||
|
|
||||||
extern SECItem *
|
|
||||||
NSS_CMSSignedData_GetDigestByAlgTag(NSSCMSSignedData *sigd, SECOidTag algtag);
|
|
||||||
|
|
||||||
extern SECStatus
|
extern SECStatus
|
||||||
NSS_CMSSignedData_SetDigests(NSSCMSSignedData *sigd,
|
NSS_CMSSignedData_SetDigests(NSSCMSSignedData *sigd,
|
||||||
SECAlgorithmID **digestalgs,
|
SECAlgorithmID **digestalgs,
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
/*
|
/*
|
||||||
* CMS signedData methods.
|
* CMS signedData methods.
|
||||||
*
|
*
|
||||||
* $Id: cmssigdata.c,v 1.19 2003/11/26 22:02:38 nelsonb%netscape.com Exp $
|
* $Id: cmssigdata.c,v 1.20 2003/11/26 23:50:02 wchang0222%aol.com Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "cmslocal.h"
|
#include "cmslocal.h"
|
||||||
|
@ -599,7 +599,7 @@ NSS_CMSSignedData_VerifySignerInfo(NSSCMSSignedData *sigd, int i,
|
||||||
algiddata = NSS_CMSSignerInfo_GetDigestAlg(signerinfo);
|
algiddata = NSS_CMSSignerInfo_GetDigestAlg(signerinfo);
|
||||||
if (!algiddata)
|
if (!algiddata)
|
||||||
return SECFailure; /* error code is set */
|
return SECFailure; /* error code is set */
|
||||||
digest = NSS_CMSSignedData_GetDigestByAlgTag(sigd, algiddata->offset);
|
digest = NSS_CMSSignedData_GetDigestValue(sigd, algiddata->offset);
|
||||||
if (!digest) {
|
if (!digest) {
|
||||||
PORT_SetError(SEC_ERROR_PKCS7_BAD_SIGNATURE);
|
PORT_SetError(SEC_ERROR_PKCS7_BAD_SIGNATURE);
|
||||||
return SECFailure;
|
return SECFailure;
|
||||||
|
@ -769,15 +769,6 @@ loser:
|
||||||
return SECFailure;
|
return SECFailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
SECItem *
|
|
||||||
NSS_CMSSignedData_GetDigestByAlgTag(NSSCMSSignedData *sigd, SECOidTag algtag)
|
|
||||||
{
|
|
||||||
int idx;
|
|
||||||
|
|
||||||
idx = NSS_CMSAlgArray_GetIndexByAlgTag(sigd->digestAlgorithms, algtag);
|
|
||||||
return sigd->digests[idx];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NSS_CMSSignedData_SetDigests - set a signedData's digests member
|
* NSS_CMSSignedData_SetDigests - set a signedData's digests member
|
||||||
*
|
*
|
||||||
|
@ -917,6 +908,7 @@ loser:
|
||||||
return SECFailure;
|
return SECFailure;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* XXX This function doesn't set the error code on failure. */
|
||||||
SECItem *
|
SECItem *
|
||||||
NSS_CMSSignedData_GetDigestValue(NSSCMSSignedData *sigd, SECOidTag digestalgtag)
|
NSS_CMSSignedData_GetDigestValue(NSSCMSSignedData *sigd, SECOidTag digestalgtag)
|
||||||
{
|
{
|
||||||
|
|
Загрузка…
Ссылка в новой задаче