View acceptable client certificate CA names asked for during SSL renegotiations

openssl s_client -connect www.example.com:443 -prexit
The key is to use the -prexit option at the command line, and then type "quit" instead of CTRL-C to exit OpenSSL. OpenSSL will then dump its last negotiated state, printing out the contents of the renegotiated handshake. Crucial for debugging client certificate configurations on web servers such as IIS, which renegotiate the SSL/TLS connection with the HTTP request in-flight to ask the client for a cert.
Sample Output
GET / HTTP/1.1
Host: www.example.com

read R BLOCK
HTTP/1.1 403 Forbidden

quit

---
Acceptable client certificate CA names
/C=US/O=YourOrg/OU=YourUnit/CN=YourCertificateAuthorityName1
/C=US/O=YourOrg/OU=YourUnit/CN=YourCertificateAuthorityName2
---

3
By: JonInVA
2010-02-17 15:46:37

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: