diff options
author | Jack Lloyd <[email protected]> | 2017-04-29 10:43:45 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-04-29 10:43:45 -0400 |
commit | 8dce4dd146b91697c5da932f55b542b84efb79f7 (patch) | |
tree | 8dc54aaf3e8131f491b92e07f6cf3d0a99fdbb82 | |
parent | 9b1dc6ef3f5f90760aca8bdb6ae870a65b5449c6 (diff) | |
parent | c2cfd74e4b174fb23a5172a55dd02ca473f0da13 (diff) |
Merge GH #1031 Show OpenSSL errors in case of test failure
-rw-r--r-- | src/lib/prov/openssl/openssl_rsa.cpp | 1 | ||||
-rw-r--r-- | src/tests/main.cpp | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/prov/openssl/openssl_rsa.cpp b/src/lib/prov/openssl/openssl_rsa.cpp index e7a562cf5..2ff144bde 100644 --- a/src/lib/prov/openssl/openssl_rsa.cpp +++ b/src/lib/prov/openssl/openssl_rsa.cpp @@ -26,7 +26,6 @@ namespace { std::pair<int, size_t> get_openssl_enc_pad(const std::string& eme) { - ERR_load_crypto_strings(); if(eme == "Raw") return std::make_pair(RSA_NO_PADDING, 0); else if(eme == "EME-PKCS1-v1_5") diff --git a/src/tests/main.cpp b/src/tests/main.cpp index c90aaec7b..19ddfb40f 100644 --- a/src/tests/main.cpp +++ b/src/tests/main.cpp @@ -30,6 +30,10 @@ #include <botan/auto_rng.h> #endif +#if defined(BOTAN_HAS_OPENSSL) + #include <botan/internal/openssl.h> +#endif + namespace { class Test_Runner : public Botan_CLI::Command @@ -153,6 +157,12 @@ class Test_Runner : public Botan_CLI::Command output() << " provider:" << provider; pf.set(provider); } +#if defined(BOTAN_HAS_OPENSSL) + if(provider.empty() || provider == "openssl") + { + ERR_load_crypto_strings(); + } +#endif std::unique_ptr<Botan::RandomNumberGenerator> rng; |