Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-03-2013, 11:03 AM   #1
LQ Newbie
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Check all certs in ssl.conf

Hi all,

Not sure why this isn't working but I want to be able to check the expiry on a number of domains.

for line in `grep SSLCertificateFile /etc/httpd/conf.d/ssl.conf|grep -v \#|awk '{print $2}'`
openssl x509 -in $line -text -noout |grep "Not After"
#echo $line;
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:

Error opening Certificate /etc/httpd/conf/ssl.crt/
','r')error:02001002:system library:fopen:No such file or directory:bss_file.c:352:fopen('/etc/httpd/conf/ssl.crt/
10756:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:354:
unable to load certificate
Old 01-04-2013, 11:27 AM   #2
LQ Newbie
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
My guess is that its grabbing the EOL character immediately after the path to the certificate. If I remove the character in the initial awk command it breaks because the EOL character of course says that the text is a line. If I try to remove the character afterwards it still complains.

Any thoughts?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSL Certs on Squid citystriker Linux - Networking 2 01-11-2015 11:16 PM
Possible to use multiple SSL certs for same IP in Apache? jakev383 Linux - Server 3 09-03-2009 06:48 AM
SSL certs watcher69b Linux - Security 2 03-28-2009 11:34 AM
SSL certs/keys location BEBigBear Linux - Security 6 01-04-2009 10:03 AM
install 2 or more SSL certs on same machine with 1 IP lsimon4180 Linux - Software 0 10-22-2004 02:19 PM

All times are GMT -5. The time now is 05:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration