aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2019-07-23 08:22:42 -0400
committerJack Lloyd <[email protected]>2019-07-23 08:22:42 -0400
commita358c808c6add6111285b86e2784945d3cad26f8 (patch)
treee6d023f6620cc92edb2f425b71a791643f25da99 /src/lib
parentee65e1fe8ea82ba4afc74f2167162a5d96855af5 (diff)
Fix "OSCP" typo in OCSP code.
GH #2048
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/x509/cert_status.cpp6
-rw-r--r--src/lib/x509/cert_status.h4
-rw-r--r--src/lib/x509/x509path.cpp8
3 files changed, 11 insertions, 7 deletions
diff --git a/src/lib/x509/cert_status.cpp b/src/lib/x509/cert_status.cpp
index 4efd49edf..bd27a6d5b 100644
--- a/src/lib/x509/cert_status.cpp
+++ b/src/lib/x509/cert_status.cpp
@@ -26,10 +26,10 @@ const char* to_string(Certificate_Status_Code code)
return "Certificate serial number is negative";
case Certificate_Status_Code::DN_TOO_LONG:
return "Distinguished name too long";
- case Certificate_Status_Code::OSCP_NO_REVOCATION_URL:
+ case Certificate_Status_Code::OCSP_NO_REVOCATION_URL:
return "OCSP URL not available";
- case Certificate_Status_Code::OSCP_SERVER_NOT_AVAILABLE:
- return "OSCP server not available";
+ case Certificate_Status_Code::OCSP_SERVER_NOT_AVAILABLE:
+ return "OCSP server not available";
case Certificate_Status_Code::NO_REVOCATION_DATA:
return "No revocation data";
diff --git a/src/lib/x509/cert_status.h b/src/lib/x509/cert_status.h
index b682746f8..33d6b6b65 100644
--- a/src/lib/x509/cert_status.h
+++ b/src/lib/x509/cert_status.h
@@ -30,6 +30,10 @@ enum class Certificate_Status_Code {
FIRST_WARNING_STATUS = 500,
CERT_SERIAL_NEGATIVE = 500,
DN_TOO_LONG = 501,
+ OCSP_NO_REVOCATION_URL = 502,
+ OCSP_SERVER_NOT_AVAILABLE = 503,
+
+ // Typo versions of above - will be removed in future major release
OSCP_NO_REVOCATION_URL = 502,
OSCP_SERVER_NOT_AVAILABLE = 503,
diff --git a/src/lib/x509/x509path.cpp b/src/lib/x509/x509path.cpp
index d0604e1c6..cecefcc79 100644
--- a/src/lib/x509/x509path.cpp
+++ b/src/lib/x509/x509path.cpp
@@ -374,7 +374,7 @@ PKIX::check_ocsp_online(const std::vector<std::shared_ptr<const X509_Certificate
if(subject->ocsp_responder() == "")
{
ocsp_response_futures.emplace_back(std::async(std::launch::deferred, [&]() -> std::shared_ptr<const OCSP::Response> {
- return std::make_shared<const OCSP::Response>(Certificate_Status_Code::OSCP_NO_REVOCATION_URL);
+ return std::make_shared<const OCSP::Response>(Certificate_Status_Code::OCSP_NO_REVOCATION_URL);
}));
}
else
@@ -396,7 +396,7 @@ PKIX::check_ocsp_online(const std::vector<std::shared_ptr<const X509_Certificate
// log e.what() ?
}
if (http.status_code() != 200)
- return std::make_shared<const OCSP::Response>(Certificate_Status_Code::OSCP_SERVER_NOT_AVAILABLE);
+ return std::make_shared<const OCSP::Response>(Certificate_Status_Code::OCSP_SERVER_NOT_AVAILABLE);
// Check the MIME type?
return std::make_shared<const OCSP::Response>(http.body());
@@ -785,8 +785,8 @@ void PKIX::merge_revocation_status(CertificatePathStatusCodes& chain_status,
for(auto&& code : ocsp[i])
{
if(code == Certificate_Status_Code::OCSP_RESPONSE_GOOD ||
- code == Certificate_Status_Code::OSCP_NO_REVOCATION_URL || // softfail
- code == Certificate_Status_Code::OSCP_SERVER_NOT_AVAILABLE) // softfail
+ code == Certificate_Status_Code::OCSP_NO_REVOCATION_URL || // softfail
+ code == Certificate_Status_Code::OCSP_SERVER_NOT_AVAILABLE) // softfail
{
had_ocsp = true;
}