Add in CERT_UNKNOWN detection

This commit is contained in:
Andras Fekete
2023-03-14 18:09:45 -04:00
parent bcd6bce040
commit c6e7ea685e

View File

@ -395,7 +395,11 @@ int CheckOcspResponse(WOLFSSL_OCSP *ocsp, byte *response, int responseSz,
end:
if (ret == 0 && validated == 1) {
WOLFSSL_MSG("New OcspResponse validated");
} else if (ret != OCSP_CERT_REVOKED) {
} else if ((ret == ocsp->error) && (ocspResponse->single->status->status == CERT_UNKNOWN)) {
WOLFSSL_MSG("OCSP unknown");
ret = OCSP_CERT_UNKNOWN;
} else if ((ret != OCSP_CERT_REVOKED) && (ret != ocsp->error)) {
WOLFSSL_MSG("OCSP lookup failure");
ret = OCSP_LOOKUP_FAIL;
}