From d186d41fc1cd264704537a26b82a0fb168bb1a68 Mon Sep 17 00:00:00 2001 From: Gilles Mouchet Date: Thu, 30 Apr 2026 18:33:01 +0200 Subject: [PATCH] 1.0.0 --- lib/expired-date.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/expired-date.sh b/lib/expired-date.sh index 0878e7b..4b70b24 100644 --- a/lib/expired-date.sh +++ b/lib/expired-date.sh @@ -26,8 +26,8 @@ expired_date(){ shopt -u nullglob if [ "${#certList[@]}" -gt "0" ]; then for crtFile in "${certList[@]}"; do - # set data from certfificate - cn=$(openssl x509 -noout -subject -in $crtFile | cut -d"=" -f3) + # set data from certfificate. xargs remove space at begin and end cn + cn=$(openssl x509 -noout -subject -in $crtFile | cut -d"=" -f3 | xargs) expiration=$(openssl x509 -noout -in $crtFile -enddate | cut -d"=" -f2) # convert in timestamp Unix exp=$(date -u -d "$expiration" +%s)