diff options
Diffstat (limited to 'security/nss/lib/smime/cmssiginfo.c')
-rw-r--r-- | security/nss/lib/smime/cmssiginfo.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/security/nss/lib/smime/cmssiginfo.c b/security/nss/lib/smime/cmssiginfo.c index a9c46d07e..bbc6f630b 100644 --- a/security/nss/lib/smime/cmssiginfo.c +++ b/security/nss/lib/smime/cmssiginfo.c @@ -566,6 +566,7 @@ CERTCertificate * NSS_CMSSignerInfo_GetSigningCertificate(NSSCMSSignerInfo *signerinfo, CERTCertDBHandle *certdb) { CERTCertificate *cert; + NSSCMSSignerIdentifier *sid; if (signerinfo->cert != NULL) return signerinfo->cert; @@ -580,16 +581,13 @@ NSS_CMSSignerInfo_GetSigningCertificate(NSSCMSSignerInfo *signerinfo, CERTCertDB * we leave this function -- we let the clean-up of the entire * cinfo structure later do the destroy of this cert. */ - switch (signerinfo->signerIdentifier.identifierType) { + sid = &signerinfo->signerIdentifier; + switch (sid->identifierType) { case NSSCMSSignerID_IssuerSN: - cert = CERT_FindCertByIssuerAndSN(certdb, signerinfo->signerIdentifier.id.issuerAndSN); + cert = CERT_FindCertByIssuerAndSN(certdb, sid->id.issuerAndSN); break; case NSSCMSSignerID_SubjectKeyID: -#if 0 /* not yet implemented */ - cert = CERT_FindCertBySubjectKeyID(certdb, signerinfo->signerIdentifier.id.subjectKeyID); -#else - cert = NULL; -#endif + cert = CERT_FindCertBySubjectKeyID(certdb, sid->id.subjectKeyID); break; default: cert = NULL; |