aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test_x509_path.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tests/test_x509_path.cpp b/src/tests/test_x509_path.cpp
index 149c6ec2a..a7da0ee18 100644
--- a/src/tests/test_x509_path.cpp
+++ b/src/tests/test_x509_path.cpp
@@ -33,26 +33,25 @@ class X509test_Path_Validation_Tests : public Test
std::vector<Test::Result> results;
// Test certs generated by https://github.com/yymax/x509test
- const std::string test_dir = "src/tests/data/x509test";
- std::map<std::string, std::string> expected = read_results(test_dir + "/expected.txt");
+ std::map<std::string, std::string> expected = read_results(data_file("x509test/expected.txt"));
const Botan::Path_Validation_Restrictions default_restrictions;
- Botan::X509_Certificate root(test_dir + "/root.pem");
+ Botan::X509_Certificate root(data_file("x509test/root.pem"));
Botan::Certificate_Store_In_Memory trusted;
trusted.add_certificate(root);
for(auto i = expected.begin(); i != expected.end(); ++i)
{
Test::Result result("X509test path validation");
- const std::string fsname = i->first;
+ const std::string filename = i->first;
const std::string expected = i->second;
- std::vector<Botan::X509_Certificate> certs = load_cert_file(test_dir + "/" + fsname);
+ std::vector<Botan::X509_Certificate> certs = load_cert_file(data_file("x509test/" + filename));
if(certs.empty())
- throw Test_Error("Failed to read certs from " + fsname);
+ throw Test_Error("Failed to read certs from " + filename);
Botan::Path_Validation_Result path_result = Botan::x509_path_validate(
certs, default_restrictions, trusted,