openssl x509 -in cert.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
You may need to add -inform der
to the first command if cert.crt is in DER form rather than in PEM form.
openssl x509 -in cert.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
You may need to add -inform der
to the first command if cert.crt is in DER form rather than in PEM form.