LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-11-2014, 02:11 PM   #1
Nemus
Member
 
Registered: Apr 2007
Distribution: Fedora/Ubuntu
Posts: 63

Rep: Reputation: 15
Openssl s_client -connect not seeing certificates of Apache Virtual Hosts


So I want to monitor my certificates on my web server which has multiple certificates that Apache is severing via virtual hosts for different domains.

How can I get openssl s_client -connect to display the certificate information for each of the certificates ?

I've tried something like the following, but it just returns the certificate I would see if I went to the site manually via the ip address.

echo "GET https://test.example.com/ HTTP/1.1" | openssl s_client -state -nbio -connect test.example.com:443 | openssl x509 -noout -text

Also is there away I could do this with curl?
 
Old 09-20-2014, 02:38 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by Nemus View Post
So I want to monitor my certificates on my web server which has multiple certificates that Apache is severing via virtual hosts for different domains.
There's probably already a tool for that maybe called "certwatch" or like that.


Quote:
Originally Posted by Nemus View Post
How can I get openssl s_client -connect to display the certificate information for each of the certificates ? I've tried something like the following, but it just returns the certificate I would see if I went to the site manually via the ip address.
I don't get your explanation of the difference between things you tried or what you're trying to accomplish as "go to the site manually" is exactly what s_client does. Please explain in detail.


Quote:
Originally Posted by Nemus View Post
Also is there away I could do this with curl?
No, because any tool that understands SSL will set up a connection and properly validate the certificate before moving on to the encapsulated protocol part.
 
  


Reply



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
openssl s_client and certificates desmondc Linux - Security 1 09-13-2011 01:01 AM
Apache 2 and virtual hosts Ephracis Linux - Software 2 06-16-2008 05:37 AM
apache virtual hosts Red Squirrel Linux - Software 4 06-20-2004 09:05 AM
Apache virtual hosts Mil0 Linux - Software 5 06-01-2003 11:58 PM
Apache: Virtual hosts pk21 Linux - Software 15 10-08-2002 05:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:52 AM.

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