summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-12-22 21:08:51 +0100
committerCarl Hetherington <cth@carlh.net>2022-12-22 21:14:07 +0100
commitae49e51a1bdbdaf6b8b75bcd9a0bbac9642639d4 (patch)
tree98e19d8e031115471e3b223fb9c78dddccc3d3e8
parent1d168b8a94d2c3ae14f52fea222fa7bbdf5c1058 (diff)
Support some different headers in private_key_fingerprint()
-rw-r--r--src/util.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/util.cc b/src/util.cc
index 6ae69387..b58035ea 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -293,6 +293,8 @@ dcp::private_key_fingerprint (string key)
{
boost::replace_all (key, "-----BEGIN RSA PRIVATE KEY-----\n", "");
boost::replace_all (key, "\n-----END RSA PRIVATE KEY-----\n", "");
+ boost::replace_all (key, "-----BEGIN PRIVATE KEY-----\n", "");
+ boost::replace_all (key, "\n-----END PRIVATE KEY-----\n", "");
unsigned char buffer[4096];
int const N = base64_decode (key, buffer, sizeof (buffer));