mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
break up sig confirm errors into no sig, crl, and ocsp specific
This commit is contained in:
@@ -2726,7 +2726,7 @@ int ParseCertRelative(DecodedCert* cert, int type, int verify, void* cm)
|
|||||||
else {
|
else {
|
||||||
/* no signer */
|
/* no signer */
|
||||||
CYASSL_MSG("No CA signer to verify with");
|
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)
|
if (ret == 0)
|
||||||
{
|
{
|
||||||
CYASSL_MSG("\tConfirm signature failed");
|
CYASSL_MSG("\tOCSP Confirm signature failed");
|
||||||
return ASN_SIG_CONFIRM_E;
|
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,
|
ca->publicKey, ca->pubKeySize, ca->keyOID,
|
||||||
dcrl->signature, dcrl->sigLength, dcrl->signatureOID, NULL)) {
|
dcrl->signature, dcrl->sigLength, dcrl->signatureOID, NULL)) {
|
||||||
CYASSL_MSG("CRL Confirm signature failed");
|
CYASSL_MSG("CRL Confirm signature failed");
|
||||||
return ASN_SIG_CONFIRM_E;
|
return ASN_CRL_CONFIRM_E;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
CYASSL_MSG("Did NOT find CRL issuer CA");
|
CYASSL_MSG("Did NOT find CRL issuer CA");
|
||||||
return ASN_SIG_CONFIRM_E;
|
return ASN_CRL_NO_SIGNER_E;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -303,6 +303,22 @@ void CTaoCryptErrorString(int error, char* buffer)
|
|||||||
XSTRNCPY(buffer, "Bad alignment error, no alloc help", max);
|
XSTRNCPY(buffer, "Bad alignment error, no alloc help", max);
|
||||||
break;
|
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:
|
default:
|
||||||
XSTRNCPY(buffer, "unknown error number", max);
|
XSTRNCPY(buffer, "unknown error number", max);
|
||||||
|
|
||||||
|
@@ -108,7 +108,11 @@ enum {
|
|||||||
DECOMPRESS_INIT_E = -185, /* DeCompress init error */
|
DECOMPRESS_INIT_E = -185, /* DeCompress init error */
|
||||||
DECOMPRESS_E = -186, /* DeCompress 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 */
|
MIN_CODE_E = -200 /* errors -101 - -199 */
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user