diff --git a/src/crypto/OCSP.cpp b/src/crypto/OCSP.cpp index bb512ba11..b9faf912c 100644 --- a/src/crypto/OCSP.cpp +++ b/src/crypto/OCSP.cpp @@ -132,7 +132,7 @@ OCSP::OCSP(const unsigned char *data, size_t size) return; resp.reset(d2i_OCSP_RESPONSE(nullptr, &data, long(size)), OCSP_RESPONSE_free); if(resp) - basic.reset(OCSP_response_get1_basic(resp.get()), OCSP_BASICRESP_free); + basic.reset(OCSP_response_get1_basic(resp.get()), OCSP_BASICRESP_free); } bool OCSP::compareResponderCert(const X509Cert &cert) const @@ -183,7 +183,7 @@ OCSP::operator vector() const */ void OCSP::verifyResponse(const X509Cert &cert) const { - if(!resp) + if(!basic) THROW("Failed to verify OCSP response."); tm tm = producedAt();