Make public_key_digest() testable.
authorCarl Hetherington <cth@carlh.net>
Mon, 8 Jan 2024 11:54:00 +0000 (12:54 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 8 Jan 2024 11:54:00 +0000 (12:54 +0100)
src/certificate_chain.cc
src/certificate_chain.h

index 6748d73c7fe5d0173ee110aff9059ac75a28d2bf..5afe8a27afad0a07da6ea5d01ff96c75f0b01d1f 100644 (file)
@@ -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";
 
index 5d94b74ba7617fbd1303a3532ca86c99c148a0ff..aabe9f008a1f4c94b9a61fc1d0d098b6dbf296b2 100644 (file)
@@ -190,6 +190,9 @@ private:
 };
 
 
+std::string public_key_digest(boost::filesystem::path private_key, boost::filesystem::path openssl);
+
+
 }