commit 3993dfdd1c6c804f63c56a4a9f637b721507ddf1 from: Omar Polo date: Sun Jan 30 22:59:14 2022 UTC add fingerprint and gencert commit - 13bdd729b80a3fdcdc018218a8dbae92bf112c1d commit + 3993dfdd1c6c804f63c56a4a9f637b721507ddf1 blob - /dev/null blob + fc54241720ac9498d93d4e020bd98351d2635671 (mode 755) --- /dev/null +++ contrib/fingerprint @@ -0,0 +1,11 @@ +#!/bin/sh +# +# usage: fingerprint +# dump a fingerprint of the given file. + +file="${1?:missing file name}" + +printf "SHA256:" +openssl x509 -in "$file" -noout -fingerprint -sha256 | + sed -e 's/^.*=//' -e 's/://g' | + tr A-Z a-z blob - /dev/null blob + 25ab8ede55fefa12a7510a3864c6f8c02c0c1b4c (mode 755) --- /dev/null +++ contrib/gencert @@ -0,0 +1,15 @@ +#!/bin/sh +# +# usage: gencert +# generates a certificate and private key and saves them in the +# given file. + +file="${1?:missing file name}" + +exec openssl req -x509 \ + -newkey rsa:4096 \ + -out "$file" \ + -keyout "$file" \ + -days 365 \ + -nodes \ + -subj /