From dee2fde67da78a5ea8a5de6f33a7e5c2992493b5 Mon Sep 17 00:00:00 2001 From: Gabriel Moreau <gabriel.moreau@univ-grenoble-alpes.fr> Date: Thu, 3 Aug 2023 16:12:10 +0200 Subject: [PATCH] Stupid, grep without file --- certcheck | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/certcheck b/certcheck index 275e49c..ffc0839 100755 --- a/certcheck +++ b/certcheck @@ -5,7 +5,7 @@ export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin export LANG=C -export VERSION=0.3.5 +export VERSION=0.3.6 function usage() { cat <<END_USAGE @@ -107,10 +107,10 @@ case "${action}" in text|txt) [ -s "${CRT}" ] || say_warning "missing ${CRT}" - grep -q -- '-----BEGIN PRIVATE KEY-----' && say_warning "give the public and not the private key!" - grep -q -- '-----BEGIN CERTIFICATE-----' || say_warning "your key is not in PEM format!" + grep -q -- '-----BEGIN PRIVATE KEY-----' "${CRT}" && say_warning 'give the public and not the private key!' + grep -q -- '-----BEGIN CERTIFICATE-----' "${CRT}" || say_warning "your key isn't in PEM format!" openssl x509 -noout -text -in "${CRT}" \ - | egrep '(Subject|Not Before|Not After[[:space:]]|DNS|Issuer):' \ + | grep -E '(Subject|Not Before|Not After[[:space:]]|DNS|Issuer):' \ | sed -e 's/^\s*//g;' \ | sort -r ;; -- GitLab