Hi all,
Not sure why this isn't working but I want to be able to check the expiry on a number of domains.
Code:
#!/bin/bash
for line in `grep SSLCertificateFile /etc/httpd/conf.d/ssl.conf|grep -v \#|awk '{print $2}'`
do
openssl x509 -in $line -text -noout |grep "Not After"
#echo $line;
done
The echo shows the correct path to the file and if I run the openssl command with that file path it works fine. The error I am getting is:
Code:
Error opening Certificate /etc/httpd/conf/ssl.crt/www.mydomain.com.crt
','r')error:02001002:system library:fopen:No such file or directory:bss_file.c:352:fopen('/etc/httpd/conf/ssl.crt/www.mydomain.com.crt
10756:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:354:
unable to load certificate