How to Determine OpenSSL’s Default Directory OPENSSLDIR

My Problem

While using certain tools that rely on the OpenSSL package, I was looking for a way to determine what the main directory for OpenSSL is on any given installation. This is particularly useful for finding where the main cert.pem file is. That location is different on various systems, and if OpenSSL has been compiled outside of a package, the --openssldir option can be changed to something outside of the norm, further upsetting you.

My Solution

In a shell, use the following command:

openssl version -d

In my case, on a RedHat derivative with the standard OpenSSL package, the response was:

OPENSSLDIR: "/etc/pki/tls"

One Comment

  1. Luca Francesca

    January 27, 2014 at 8:21 am

    It works on Mac Os X Mavericks too :)


Leave a Reply

Follow TheNubbyAdmin!

follow us in feedly

Raw RSS Feed:

Contact Me!

Want to hire me as a consultant? Have a job you think I might be interested in? Drop me a line:

Contact Me!

Subscribe via Email

Your email address is handled by Google FeedBurner and never spammed!

The Nubby Archives

Circle Me on Google+!

Photos from Flickr

Me on StackExchange

The IT Crowd Strava Group

%d bloggers like this: