.config/fish/functions/printx509.fish
1 2 3 4 5 6 7 8 9 10 |
function printx509 --description "Helper to pretty-print DER/PEM-encoded X.509 certificates"
if test (count $argv) -eq 0
echo "usage: $0 [path(s) to one or more certificates to pretty-print...] "
return 1
end
for cert in $argv
# TODO: verify filetype of certificate
openssl x509 -text -noout -in $cert
end
end
|