diff options
author | Alexander Bluhm <[email protected]> | 2017-08-13 05:39:50 +0200 |
---|---|---|
committer | Alexander Bluhm <[email protected]> | 2017-08-13 05:48:41 +0200 |
commit | 7ab9ab26ab19c26428932954fea47efa284a77d8 (patch) | |
tree | 298e2366da4970ef67a1f1939ce48e5aeb8fbbdb /src | |
parent | 33f87a596ffa1fcbc017d9593dce0906d7d32208 (diff) |
FFI test must search test data relative to data dir.
The Test::data_file() method adds the current data dir prefix to
the test data path so that it can be overwritten with the --data-dir
option. This was missing in the ffi test and could result in a
botan_x509_cert_load_file exception.
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/test_ffi.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/test_ffi.cpp b/src/tests/test_ffi.cpp index 1607c2b2a..3b825ad4e 100644 --- a/src/tests/test_ffi.cpp +++ b/src/tests/test_ffi.cpp @@ -265,7 +265,7 @@ class FFI_Unit_Tests : public Test // x509 cert test botan_x509_cert_t cert; - if(TEST_FFI_OK(botan_x509_cert_load_file, (&cert, "src/tests/data/ecc/CSCA.CSCA.csca-germany.1.crt"))) + if(TEST_FFI_OK(botan_x509_cert_load_file, (&cert, Test::data_file("ecc/CSCA.CSCA.csca-germany.1.crt").c_str()))) { size_t date_len = 0; TEST_FFI_RC(BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE, botan_x509_cert_get_time_starts, (cert, nullptr, &date_len)); |