From 28159675983178dcb0fe61aa5c958fc12277dc95 Mon Sep 17 00:00:00 2001 From: Aaron Jones Date: Thu, 1 Dec 2016 05:08:15 +0000 Subject: [PATCH] reference.conf: simplify SPKI fingerprint generation commands [ci skip] --- doc/reference.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/reference.conf b/doc/reference.conf index e1aa89a2..b008d0e4 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -1329,12 +1329,12 @@ general { * $ openssl x509 -outform DER < your.crt | sha1sum (or sha256sum, or sha512sum) * * To generate a SPKI SHA-256 fingerprint, run the following: - * $ openssl x509 -pubkey -noout < your.crt | grep -v 'PUBLIC KEY' | base64 -d | \ - * sha256sum | awk '{ print $1 }' | sed -r -e 's/^/SPKI:SHA2-256:/' + * $ openssl x509 -pubkey -noout -in your.crt | openssl pkey -pubin -outform DER | \ + * sha256sum | sed -r -e 's/^/SPKI:SHA2-256:/' * * To generate a SPKI SHA-512 fingerprint, run the following: - * $ openssl x509 -pubkey -noout < your.crt | grep -v 'PUBLIC KEY' | base64 -d | \ - * sha512sum | awk '{ print $1 }' | sed -r -e 's/^/SPKI:SHA2-512:/' + * $ openssl x509 -pubkey -noout -in your.crt | openssl pkey -pubin -outform DER | \ + * sha512sum | sed -r -e 's/^/SPKI:SHA2-512:/' */ certfp_method = sha256; };