diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-12-22 21:08:51 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-12-22 21:14:07 +0100 |
| commit | ae49e51a1bdbdaf6b8b75bcd9a0bbac9642639d4 (patch) | |
| tree | 98e19d8e031115471e3b223fb9c78dddccc3d3e8 | |
| parent | 1d168b8a94d2c3ae14f52fea222fa7bbdf5c1058 (diff) | |
Support some different headers in private_key_fingerprint()
| -rw-r--r-- | src/util.cc | 2 |
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)); |
