From 10543328169881738a64448c7eb894c5bd1eecb6 Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Tue, 8 Aug 2017 23:38:46 +0200 Subject: [PATCH] Delete ssl-check.sh --- ssl-check.sh | 236 --------------------------------------------------- 1 file changed, 236 deletions(-) delete mode 100755 ssl-check.sh diff --git a/ssl-check.sh b/ssl-check.sh deleted file mode 100755 index e545cdc..0000000 --- a/ssl-check.sh +++ /dev/null @@ -1,236 +0,0 @@ -#!/bin/bash - -usage() -{ -cat <&2 - echo "see --help for usage" - exit 1 - ;; - esac - shift -done - -CheckLocalCert() -{ - openssl x509 -in $crt -noout $opt -} - -CheckRemoteCert() -{ - echo | - openssl s_client $servername -connect $host:$port 2>/dev/null | - openssl x509 -noout $opt -} - -if [ -z "$(type -t FormatOutput)" ]; then - FormatOutput() { cat; } -fi - -if [ -z "$opt" ]; then - opt="-text -certopt no_header,no_version,no_serial,no_signame,no_pubkey,no_sigdump,no_aux" -fi - -if [ -z "$source" ]; then - echo "ERROR: missing certificate source." - echo "Provide one via '--file' or '--host' arguments." - echo "See '--help' for examples." - exit 1 -fi - -if [ "$source" == "local" ]; then - [ -n "$DEBUG" ] && echo "DEBUG: certificate source is local file" - if [ -z "$crt" ]; then - echo "ERROR: missing certificate file" - exit 1 - fi - [ -n "$DEBUG" ] && echo - CheckLocalCert | FormatOutput -fi - -if [ "$source" == "remote" ]; then - [ -n "$DEBUG" ] && echo "DEBUG: certificate source is remote host" - if [ -z "$host" ]; then - echo "ERROR: missing remote host value." - echo "Provide one via '--host' argument" - exit 1 - fi - if [ -z "$port" ]; then - [ -n "$DEBUG" ] && echo "DEBUG: defaulting to 443 for port." - port="443" - fi - [ -n "$DEBUG" ] && echo - CheckRemoteCert | FormatOutput -fi - -