moq-rs/cert/fingerprint

13 lines
298 B
Plaintext
Raw Normal View History

2022-06-29 16:17:02 +00:00
#!/bin/bash
set -euo pipefail
HOST="localhost.warp.demo"
cd "$(dirname "${BASH_SOURCE[0]}")"
# Outputs the certificate fingerprint in the format Chrome expects
openssl x509 -pubkey -noout -in "${HOST}.crt" |
openssl rsa -pubin -outform der 2>/dev/null |
openssl dgst -sha256 -binary |
base64