mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-16 23:25:03 +00:00
Added function NSS_CMSSignedData_VerifyCertsOnly to API
This commit is contained in:
parent
08ce49edf3
commit
8c240e3bc8
@ -34,7 +34,7 @@
|
||||
/*
|
||||
* Interfaces of the CMS implementation.
|
||||
*
|
||||
* $Id: cms.h,v 1.4 2000/06/20 16:28:56 chrisk%netscape.com Exp $
|
||||
* $Id: cms.h,v 1.5 2000/09/15 06:38:32 mcgreer%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#ifndef _CMS_H_
|
||||
@ -532,6 +532,14 @@ extern SECStatus
|
||||
NSS_CMSSignedData_VerifySignerInfo(NSSCMSSignedData *sigd, int i, CERTCertDBHandle *certdb,
|
||||
SECCertUsage certusage);
|
||||
|
||||
/*
|
||||
* NSS_CMSSignedData_VerifyCertsOnly - verify the certs in a certs-only message
|
||||
*/
|
||||
extern SECStatus
|
||||
NSS_CMSSignedData_VerifyCertsOnly(NSSCMSSignedData *sigd,
|
||||
CERTCertDBHandle *certdb,
|
||||
SECCertUsage usage);
|
||||
|
||||
extern SECStatus
|
||||
NSS_CMSSignedData_AddCertList(NSSCMSSignedData *sigd, CERTCertificateList *certlist);
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
/*
|
||||
* CMS signedData methods.
|
||||
*
|
||||
* $Id: cmssigdata.c,v 1.7 2000/09/14 17:14:44 mcgreer%netscape.com Exp $
|
||||
* $Id: cmssigdata.c,v 1.8 2000/09/15 06:38:33 mcgreer%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "cmslocal.h"
|
||||
@ -516,6 +516,32 @@ NSS_CMSSignedData_VerifySignerInfo(NSSCMSSignedData *sigd, int i,
|
||||
return NSS_CMSSignerInfo_Verify(signerinfo, digest, contentType);
|
||||
}
|
||||
|
||||
/*
|
||||
* NSS_CMSSignedData_VerifyCertsOnly - verify the certs in a certs-only message
|
||||
*/
|
||||
SECStatus
|
||||
NSS_CMSSignedData_VerifyCertsOnly(NSSCMSSignedData *sigd,
|
||||
CERTCertDBHandle *certdb,
|
||||
SECCertUsage usage)
|
||||
{
|
||||
CERTCertificate *cert;
|
||||
SECStatus rv = SECSuccess;
|
||||
int i;
|
||||
|
||||
if (!sigd || !certdb) {
|
||||
PORT_SetError(SEC_ERROR_INVALID_ARGS);
|
||||
return SECFailure;
|
||||
}
|
||||
|
||||
for (i=0; i < NSS_CMSArray_Count((void**)sigd->certs); i++) {
|
||||
cert = sigd->certs[i];
|
||||
rv |= CERT_VerifyCert(certdb, cert, PR_TRUE, usage, PR_Now(),
|
||||
NULL, NULL);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
/*
|
||||
* NSS_CMSSignedData_HasDigests - see if we have digests in place
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user