sane-ssl-dump: new script to help debug ssl stuff

This commit is contained in:
colin 2022-12-20 03:25:07 +00:00
parent d60e5264f3
commit bd699c887c
2 changed files with 17 additions and 0 deletions

View File

@ -38,6 +38,7 @@ resholve.mkDerivation {
ncurses
oath-toolkit
openssh
openssl
rmlint
rsync
ssh-to-age
@ -53,6 +54,7 @@ resholve.mkDerivation {
"/tmp/rmlint.sh" = true;
# intentionally escapes (into user code)
"$external_cmd" = true;
"$maybe_sudo" = true;
};
fake = {
external = [

View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
# dump info about the provided SSL certificate
cert="$1"
maybe_sudo=
if ! (test -e "$cert")
then
cert="/var/lib/acme/${cert}/full.pem"
maybe_sudo=sudo
fi
# $maybe_sudo openssl x509 -in "$file" -text
$maybe_sudo openssl crl2pkcs7 -nocrl -certfile "$cert" | openssl pkcs7 -print_certs -text -noout