mirror of https://github.com/wolfSSL/wolfssl.git
break up sig confirm errors into no sig, crl, and ocsp specific
parent
f8ba117cef
commit
71a1abebf5
|
@ -2726,7 +2726,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
|||
else {
|
||||
/* no signer */
|
||||
CYASSL_MSG("No CA signer to verify with");
|
||||
return ASN_SIG_CONFIRM_E;
|
||||
return ASN_NO_SIGNER_E;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4611,8 +4611,8 @@ static int DecodeBasicOcspResponse(byte* source,
|
|||
|
||||
if (ret == 0)
|
||||
{
|
||||
CYASSL_MSG("\tConfirm signature failed");
|
||||
return ASN_SIG_CONFIRM_E;
|
||||
CYASSL_MSG("\tOCSP Confirm signature failed");
|
||||
return ASN_OCSP_CONFIRM_E;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5168,12 +5168,12 @@ int ParseCRL(DecodedCRL* dcrl, const byte* buff, word32 sz, void* cm)
|
|||
ca->publicKey, ca->pubKeySize, ca->keyOID,
|
||||
dcrl->signature, dcrl->sigLength, dcrl->signatureOID, NULL)) {
|
||||
CYASSL_MSG("CRL Confirm signature failed");
|
||||
return ASN_SIG_CONFIRM_E;
|
||||
return ASN_CRL_CONFIRM_E;
|
||||
}
|
||||
}
|
||||
else {
|
||||
CYASSL_MSG("Did NOT find CRL issuer CA");
|
||||
return ASN_SIG_CONFIRM_E;
|
||||
return ASN_CRL_NO_SIGNER_E;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -303,6 +303,22 @@ void CTaoCryptErrorString(int error, char* buffer)
|
|||
XSTRNCPY(buffer, "Bad alignment error, no alloc help", max);
|
||||
break;
|
||||
|
||||
case ASN_NO_SIGNER_E :
|
||||
XSTRNCPY(buffer, "ASN no signer error to confirm failure", max);
|
||||
break;
|
||||
|
||||
case ASN_CRL_CONFIRM_E :
|
||||
XSTRNCPY(buffer, "ASN CRL sig error, confirm failure", max);
|
||||
break;
|
||||
|
||||
case ASN_CRL_NO_SIGNER_E :
|
||||
XSTRNCPY(buffer, "ASN CRL no signer error to confirm failure", max);
|
||||
break;
|
||||
|
||||
case ASN_OCSP_CONFIRM_E :
|
||||
XSTRNCPY(buffer, "ASN OCSP sig error, confirm failure", max);
|
||||
break;
|
||||
|
||||
default:
|
||||
XSTRNCPY(buffer, "unknown error number", max);
|
||||
|
||||
|
|
|
@ -108,7 +108,11 @@ enum {
|
|||
DECOMPRESS_INIT_E = -185, /* DeCompress init error */
|
||||
DECOMPRESS_E = -186, /* DeCompress error */
|
||||
|
||||
BAD_ALIGN_E = -187, /* Bad alignment for operation, no alloc */
|
||||
BAD_ALIGN_E = -187, /* Bad alignment for operation, no alloc */
|
||||
ASN_NO_SIGNER_E = -188, /* ASN no signer to confirm failure */
|
||||
ASN_CRL_CONFIRM_E = -189, /* ASN CRL signature confirm failure */
|
||||
ASN_CRL_NO_SIGNER_E = -190, /* ASN CRL no signer to confirm failure */
|
||||
ASN_OCSP_CONFIRM_E = -191, /* ASN OCSP signature confirm failure */
|
||||
|
||||
MIN_CODE_E = -200 /* errors -101 - -199 */
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue