aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ocsp.cpp
diff options
context:
space:
mode:
authorPatrick Schmidt <[email protected]>2019-09-23 14:11:23 +0200
committerPatrick Schmidt <[email protected]>2019-09-24 13:34:34 +0200
commite3a171d6af53912944ac5136fb6764fcefbf6624 (patch)
tree33b6a19232b21423a396567577c87feef219c128 /src/tests/test_ocsp.cpp
parent7c3122ec4275630d78fbdcb03882b7e1fee45c81 (diff)
add status code to OCSP responses
Diffstat (limited to 'src/tests/test_ocsp.cpp')
-rw-r--r--src/tests/test_ocsp.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/tests/test_ocsp.cpp b/src/tests/test_ocsp.cpp
index e36dc25db..5ccebdb41 100644
--- a/src/tests/test_ocsp.cpp
+++ b/src/tests/test_ocsp.cpp
@@ -49,6 +49,7 @@ class OCSP_Tests final : public Test
try
{
Botan::OCSP::Response resp(Test::read_binary_data_file(ocsp_input_path));
+ result.confirm("parsing was successful", resp.status() == Botan::OCSP::Response_Status_Code::Successful);
result.test_success("Parsed input " + ocsp_input_path);
}
catch(Botan::Exception& e)
@@ -57,6 +58,9 @@ class OCSP_Tests final : public Test
}
}
+ Botan::OCSP::Response resp(Test::read_binary_data_file("x509/ocsp/patrickschmidt_ocsp_try_later_wrong_sig.der"));
+ result.confirm("parsing exposes correct status code", resp.status() == Botan::OCSP::Response_Status_Code::Try_Later);
+
return result;
}