summaryrefslogtreecommitdiffstats
path: root/fbench
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@verizonmedia.com>2020-02-20 12:03:41 +0000
committerTor Brede Vekterli <vekterli@verizonmedia.com>2020-02-20 14:23:24 +0000
commitae87223307b0fe3294e27d86719c3acb702ffed6 (patch)
treef7e4da24416919f2f2754cac3ad208e8baf6efc3 /fbench
parentacfb0463e55aa4878cc3087ffcee356696eabf2a (diff)
Move crypto utility code out into vespalib and use for test credentials
Currently offers only the following functionality: * Generate P-256 EC private keys and export to PEM * Generate X509 certificates and export to PEM Instead of using hardcoded private key/certs for unit tests, use crypto utility code to generate new credentials once per test process. Since these certs now use a SAN of `localhost` it also means we no longer need to disable hostname validation for networked unit tests.
Diffstat (limited to 'fbench')
-rw-r--r--fbench/src/fbench/fbench.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fbench/src/fbench/fbench.cpp b/fbench/src/fbench/fbench.cpp
index 593ae30a0e5..c2996eebb5c 100644
--- a/fbench/src/fbench/fbench.cpp
+++ b/fbench/src/fbench/fbench.cpp
@@ -3,10 +3,10 @@
#include <httpclient/httpclient.h>
#include <util/filereader.h>
#include <util/clientstatus.h>
+#include <vespa/vespalib/crypto/crypto_exception.h>
#include <vespa/vespalib/net/crypto_engine.h>
#include <vespa/vespalib/net/tls/transport_security_options.h>
#include <vespa/vespalib/net/tls/tls_crypto_engine.h>
-#include <vespa/vespalib/net/tls/crypto_exception.h>
#include <vespa/vespalib/io/mapped_file_input.h>
#include "client.h"
#include "fbench.h"
@@ -99,7 +99,7 @@ FBench::init_crypto_engine(const std::string &ca_certs_file_name,
}
try {
_crypto_engine = std::make_shared<vespalib::TlsCryptoEngine>(tls_opts);
- } catch (vespalib::net::tls::CryptoException &e) {
+ } catch (vespalib::crypto::CryptoException &e) {
fprintf(stderr, "%s\n", e.what());
return false;
}