summaryrefslogtreecommitdiffstats
path: root/cert2curlpub
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-10-26 17:11:38 +0100
committerFlorian Pritz <bluewind@xinu.at>2015-10-26 17:11:38 +0100
commitec54b9528b2eb32d5775bc1ff3566f1e2e2db955 (patch)
treefaafce0250705f97785b0bf30b092f9e27362fe3 /cert2curlpub
parent1c304f96c427d3538934fffa075ab50d7ab7d64a (diff)
downloadbin-ec54b9528b2eb32d5775bc1ff3566f1e2e2db955.tar.gz
bin-ec54b9528b2eb32d5775bc1ff3566f1e2e2db955.tar.xz
Add new scripts
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'cert2curlpub')
-rwxr-xr-xcert2curlpub4
1 files changed, 4 insertions, 0 deletions
diff --git a/cert2curlpub b/cert2curlpub
new file mode 100755
index 0000000..81bd07d
--- /dev/null
+++ b/cert2curlpub
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+hash=$(sed -n '/-----BEGIN/,/-----END/p' | openssl x509 -noout -pubkey | openssl rsa -noout -pubin -outform DER | openssl dgst -sha256 -binary | openssl enc -base64)
+echo "sha256//$hash"