From 815c7b9f870de727d76eb7641d924ed0831e14ec Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 8 Jan 2024 12:54:00 +0100 Subject: [PATCH] Make public_key_digest() testable. --- src/certificate_chain.cc | 4 ++-- src/certificate_chain.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/certificate_chain.cc b/src/certificate_chain.cc index 6748d73c..5afe8a27 100644 --- a/src/certificate_chain.cc +++ b/src/certificate_chain.cc @@ -124,8 +124,8 @@ command (string cmd) * @param openssl openssl binary name (or full path if openssl is not on the system path). * @return SHA1 digest of corresponding public key, with escaped / characters. */ -static string -public_key_digest (boost::filesystem::path private_key, boost::filesystem::path openssl) +string +dcp::public_key_digest(boost::filesystem::path private_key, boost::filesystem::path openssl) { boost::filesystem::path public_name = private_key.string() + ".public"; diff --git a/src/certificate_chain.h b/src/certificate_chain.h index 5d94b74b..aabe9f00 100644 --- a/src/certificate_chain.h +++ b/src/certificate_chain.h @@ -190,6 +190,9 @@ private: }; +std::string public_key_digest(boost::filesystem::path private_key, boost::filesystem::path openssl); + + } -- 2.30.2