diff options
author | Jack Lloyd <[email protected]> | 2017-11-16 13:34:51 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-11-16 13:34:51 -0500 |
commit | f458becc9c2ecb004557daad63623b8dafefe163 (patch) | |
tree | 3639e5e7bc56123e5ed550cfb891a41f947b6a62 /src/tests/test_ocsp.cpp | |
parent | 24173844eb629f6316ea0523a97b2f9561fee9e6 (diff) |
Move all the various X509 test data files under src/tests/data/x509
Diffstat (limited to 'src/tests/test_ocsp.cpp')
-rw-r--r-- | src/tests/test_ocsp.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tests/test_ocsp.cpp b/src/tests/test_ocsp.cpp index b0384acb8..1d64018cc 100644 --- a/src/tests/test_ocsp.cpp +++ b/src/tests/test_ocsp.cpp @@ -66,9 +66,9 @@ class OCSP_Tests final : public Test // Simple parsing tests const std::vector<std::string> ocsp_input_paths = { - "ocsp/resp1.der", - "ocsp/resp2.der", - "ocsp/resp3.der" + "x509/ocsp/resp1.der", + "x509/ocsp/resp2.der", + "x509/ocsp/resp3.der" }; for(std::string ocsp_input_path : ocsp_input_paths) @@ -93,7 +93,7 @@ class OCSP_Tests final : public Test try { - Botan::OCSP::Response resp1(slurp_data_file("ocsp/resp1.der")); + Botan::OCSP::Response resp1(slurp_data_file("x509/ocsp/resp1.der")); const auto &certs1 = resp1.certificates(); if(result.test_eq("Expected count of certificates", certs1.size(), 1)) { @@ -105,7 +105,7 @@ class OCSP_Tests final : public Test result.test_eq("CN matches expected", matches, true); } - Botan::OCSP::Response resp2(slurp_data_file("ocsp/resp2.der")); + Botan::OCSP::Response resp2(slurp_data_file("x509/ocsp/resp2.der")); const auto &certs2 = resp2.certificates(); result.test_eq("Expect no certificates", certs2.size(), 0); } @@ -121,8 +121,8 @@ class OCSP_Tests final : public Test { Test::Result result("OCSP request encoding"); - const Botan::X509_Certificate end_entity(Test::data_file("ocsp/gmail.pem")); - const Botan::X509_Certificate issuer(Test::data_file("ocsp/google_g2.pem")); + const Botan::X509_Certificate end_entity(Test::data_file("x509/ocsp/gmail.pem")); + const Botan::X509_Certificate issuer(Test::data_file("x509/ocsp/google_g2.pem")); try { @@ -155,13 +155,13 @@ class OCSP_Tests final : public Test { Test::Result result("OCSP request check"); - std::shared_ptr<const Botan::X509_Certificate> ee = load_test_X509_cert("ocsp/randombit.pem"); - std::shared_ptr<const Botan::X509_Certificate> ca = load_test_X509_cert("ocsp/letsencrypt.pem"); - std::shared_ptr<const Botan::X509_Certificate> trust_root = load_test_X509_cert("ocsp/geotrust.pem"); + std::shared_ptr<const Botan::X509_Certificate> ee = load_test_X509_cert("x509/ocsp/randombit.pem"); + std::shared_ptr<const Botan::X509_Certificate> ca = load_test_X509_cert("x509/ocsp/letsencrypt.pem"); + std::shared_ptr<const Botan::X509_Certificate> trust_root = load_test_X509_cert("x509/ocsp/geotrust.pem"); const std::vector<std::shared_ptr<const Botan::X509_Certificate>> cert_path = { ee, ca, trust_root }; - std::shared_ptr<const Botan::OCSP::Response> ocsp = load_test_OCSP_resp("ocsp/randombit_ocsp.der"); + std::shared_ptr<const Botan::OCSP::Response> ocsp = load_test_OCSP_resp("x509/ocsp/randombit_ocsp.der"); Botan::Certificate_Store_In_Memory certstore; certstore.add_certificate(trust_root); @@ -187,9 +187,9 @@ class OCSP_Tests final : public Test Test::Result result("OCSP online check"); // Expired end-entity certificate: - std::shared_ptr<const Botan::X509_Certificate> ee = load_test_X509_cert("ocsp/randombit.pem"); - std::shared_ptr<const Botan::X509_Certificate> ca = load_test_X509_cert("ocsp/letsencrypt.pem"); - std::shared_ptr<const Botan::X509_Certificate> trust_root = load_test_X509_cert("ocsp/identrust.pem"); + std::shared_ptr<const Botan::X509_Certificate> ee = load_test_X509_cert("x509/ocsp/randombit.pem"); + std::shared_ptr<const Botan::X509_Certificate> ca = load_test_X509_cert("x509/ocsp/letsencrypt.pem"); + std::shared_ptr<const Botan::X509_Certificate> trust_root = load_test_X509_cert("x509/ocsp/identrust.pem"); const std::vector<std::shared_ptr<const Botan::X509_Certificate>> cert_path = { ee, ca, trust_root }; |