diff options
author | Jack Lloyd <[email protected]> | 2017-12-16 14:09:01 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-17 14:59:21 -0500 |
commit | db192f099e7cae79c391e2cec3ec26436093dcb1 (patch) | |
tree | decce824516e8e4aa9cac9e47523cbb953a03be5 /src/cli/x509.cpp | |
parent | 3679787e87482f96164f1fab4320d9ecacf1c6b9 (diff) |
Expose timeouts on the freestanding OCSP request utils
Diffstat (limited to 'src/cli/x509.cpp')
-rw-r--r-- | src/cli/x509.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cli/x509.cpp b/src/cli/x509.cpp index eb09eb41d..10e7a1c7f 100644 --- a/src/cli/x509.cpp +++ b/src/cli/x509.cpp @@ -117,16 +117,17 @@ BOTAN_REGISTER_COMMAND("cert_info", Cert_Info); class OCSP_Check final : public Command { public: - OCSP_Check() : Command("ocsp_check subject issuer") {} + OCSP_Check() : Command("ocsp_check --timeout=3000 subject issuer") {} void go() override { Botan::X509_Certificate subject(get_arg("subject")); Botan::X509_Certificate issuer(get_arg("issuer")); + std::chrono::milliseconds timeout(get_arg_sz("timeout")); Botan::Certificate_Store_In_Memory cas; cas.add_certificate(issuer); - Botan::OCSP::Response resp = Botan::OCSP::online_check(issuer, subject, &cas); + Botan::OCSP::Response resp = Botan::OCSP::online_check(issuer, subject, &cas, timeout); auto status = resp.status_for(issuer, subject, std::chrono::system_clock::now()); |