1.0.0
This commit is contained in:
parent
0a6ef958f5
commit
d186d41fc1
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user