fix confirm CA get signer bug, ugh

This commit is contained in:
Todd A Ouska 2011-04-13 17:21:30 -07:00
parent 2da2e15484
commit 4cf94570d7

View File

@ -1785,12 +1785,12 @@ int ParseCertRelative(DecodedCert* cert, word32 inSz, int type, int verify,
return ASN_SIG_OID_E;
if (verify && type != CA_TYPE) {
Signer* signer = GetCA(signers, cert->issuerHash);
Signer* ca = GetCA(signers, cert->issuerHash);
if (signer) {
if (ca) {
/* try to confirm/verify signature */
if (!ConfirmSignature(cert, signers->publicKey,
signers->pubKeySize, signers->keyOID))
if (!ConfirmSignature(cert, ca->publicKey,
ca->pubKeySize, ca->keyOID))
return ASN_SIG_CONFIRM_E;
}
else {
@ -2227,7 +2227,6 @@ void InitCert(Cert* cert)
cert->bodySz = 0;
cert->keyType = RSA_KEY;
XMEMSET(cert->serial, 0, SERIAL_SIZE);
cert->serialSz = 0;
cert->issuer.country[0] = '\0';
cert->issuer.state[0] = '\0';