summaryrefslogtreecommitdiff
path: root/functions/sslcheckdate.fish
blob: 3bd6228b4ab7660e324000ce4ce7ac83dc3af7af (plain)
1
2
3
4
5
function sslcheckdate --description "Check the validity date of a distant SSL server"
    # PEM format
    echo "Validity dates of certificat of $argv[1] on port 443 (PEM format)"
    echo "Q" | openssl s_client -servername $argv[1] -connect $argv[1]:443 2>/dev/null | openssl x509 -noout -dates
end