diff --git a/ctaocrypt/src/asn.c b/ctaocrypt/src/asn.c index 10d391cfc..67cf02ce8 100644 --- a/ctaocrypt/src/asn.c +++ b/ctaocrypt/src/asn.c @@ -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';