Browse Source

Add get-cert-fingerprint.sh

OVERdrive-IRC IRCd Development 3 years ago
parent
commit
c2f12ee1db
1 changed files with 10 additions and 0 deletions
  1. 10
    0
      get-cert-fingerprint.sh

+ 10
- 0
get-cert-fingerprint.sh View File

@@ -0,0 +1,10 @@
1
+#!/bin/bash
2
+
3
+cert="$1"
4
+if [[ -z "$cert" ]]; then
5
+	cert="etc/cert.pem"
6
+fi
7
+
8
+for hash in "sha256" "sha1"; do
9
+	openssl x509 -noout -in "$cert" -fingerprint -${hash} | head -n 1
10
+done