diff options
author | Jack Lloyd <[email protected]> | 2017-11-16 19:46:52 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-11-16 19:46:52 -0500 |
commit | d1954b4702694f0d95e29fabde6c9d88b379e29c (patch) | |
tree | a47d1abc93e31ad716cea979fb382418c992bc71 /src/lib/x509/x509self.cpp | |
parent | 5620a20509ba51b67d8329f2acab4242a733d2a5 (diff) |
Fix encoding of subject key identifier
Changed in #884 - we were copying the entire public key as the
public key id. Instead hash it with whatever hash we are using
to sign the certificate.
Diffstat (limited to 'src/lib/x509/x509self.cpp')
-rw-r--r-- | src/lib/x509/x509self.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/x509/x509self.cpp b/src/lib/x509/x509self.cpp index b8f8fbdc8..ad0e9af94 100644 --- a/src/lib/x509/x509self.cpp +++ b/src/lib/x509/x509self.cpp @@ -76,7 +76,7 @@ X509_Certificate create_self_signed_cert(const X509_Cert_Options& opts, extensions.add(new Cert_Extension::Key_Usage(constraints), true); } - extensions.add(new Cert_Extension::Subject_Key_ID(pub_key)); + extensions.add(new Cert_Extension::Subject_Key_ID(pub_key, hash_fn)); extensions.add( new Cert_Extension::Subject_Alternative_Name(subject_alt)); |