diff options
author | Jack Lloyd <[email protected]> | 2016-12-19 22:19:28 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-12-19 22:19:28 -0500 |
commit | 113a3d7d770dae2b50dc38fcfe9c0fd42f30e157 (patch) | |
tree | 1dc39bb658ab9871fb3dc95c9d77fd7e92aa3bca /src/tests/test_x509_path.cpp | |
parent | 2dc484dc6c2a886b87ceeda75959b96a7e16dad6 (diff) |
Remove duplicate test data
All 76 of the NIST certificate tests use the same root certificate
and that issuer has an identical CRL for each test.
So, just have the one copy.
Diffstat (limited to 'src/tests/test_x509_path.cpp')
-rw-r--r-- | src/tests/test_x509_path.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tests/test_x509_path.cpp b/src/tests/test_x509_path.cpp index facebf139..63a4a9070 100644 --- a/src/tests/test_x509_path.cpp +++ b/src/tests/test_x509_path.cpp @@ -160,6 +160,9 @@ std::vector<Test::Result> NIST_Path_Validation_Tests::run() std::map<std::string, std::string> expected = read_results(Test::data_file("nist_x509/expected.txt")); + const Botan::X509_Certificate root_cert(nist_test_dir + "/root.crt"); + const Botan::X509_CRL root_crl(nist_test_dir + "/root.crl"); + for(auto i = expected.begin(); i != expected.end(); ++i) { const std::string test_name = i->first; @@ -180,6 +183,9 @@ std::vector<Test::Result> NIST_Path_Validation_Tests::run() Botan::Certificate_Store_In_Memory store; + store.add_certificate(root_cert); + store.add_crl(root_crl); + for(auto&& file : all_files) { if(file.find(".crt") != std::string::npos && file != "end.crt") |