mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-02-03 23:45:05 +01:00
added OCSP error codes
This commit is contained in:
@@ -1697,9 +1697,9 @@ static int DoCertificate(CYASSL* ssl, byte* input, word32* inOutIdx)
|
||||
}
|
||||
|
||||
#ifdef HAVE_OCSP
|
||||
if (CyaSSL_OCSP_Lookup_Cert(&ssl->ctx->ocsp, &dCert) == CERT_REVOKED) {
|
||||
CYASSL_MSG("\tOCSP Lookup returned revoked");
|
||||
ret = OCSP_CERT_REVOKED;
|
||||
ret = CyaSSL_OCSP_Lookup_Cert(&ssl->ctx->ocsp, &dCert);
|
||||
if (ret != 0) {
|
||||
CYASSL_MSG("\tOCSP Lookup not ok");
|
||||
fatal = 0;
|
||||
}
|
||||
#endif
|
||||
@@ -3530,6 +3530,18 @@ void SetErrorString(int error, char* str)
|
||||
XSTRNCPY(str, "CRL missing, not loaded", max);
|
||||
break;
|
||||
|
||||
case OCSP_NEED_URL:
|
||||
XSTRNCPY(str, "OCSP need URL", max);
|
||||
break;
|
||||
|
||||
case OCSP_CERT_UNKNOWN:
|
||||
XSTRNCPY(str, "OCSP Cert unknown", max);
|
||||
break;
|
||||
|
||||
case OCSP_LOOKUP_FAIL:
|
||||
XSTRNCPY(str, "OCSP Responder lookup fail", max);
|
||||
break;
|
||||
|
||||
default :
|
||||
XSTRNCPY(str, "unknown error number", max);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user