How to Check the OpenSSL Version in Windows and Linux

First, make sure that you installed OpenSSL on your machine

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

How to check the OpenSSL version

Ensuring your OpenSSL version is up-to-date is crucial for maintaining system security and functionality. Whether you’re a developer or a system administrator, knowing how to quickly check your OpenSSL version can save you a lot of headaches. Here’s a quick guide to help you effortlessly check your OpenSSL version.

How do I check the version of OpenSSL?

1. Using the openssl version command

  1. Open the Terminal/Command Prompt:
    • For Windows: click on the Start menu, type cmd, and press Enter.
    • For Linux/macOS: Press Ctrl + Alt + T to open the terminal.
  2. Run the Command:
    • Type openssl version and press Enter.
    • For detailed information with flags, type openssl version -a instead.

You will see the OpenSSL version number and the date of its release. This command is straightforward and gives you the necessary details immediately. It also works the same in PowerShell if you prefer it.

This solution is the quickest way to check your OpenSSL version and is useful for ensuring that your software is up-to-date or for troubleshooting.

2. Checking via Package Manager (Linux)

  1. Press Ctrl + Alt + T to open the terminal.
  2. Run the following command to check the installed packages:
    • For Debian/Ubuntu: apt list -a openssl
    • For RedHat/CentOS: dnf list --all openssl

This will list all installed versions of OpenSSL managed by your package manager. This solution helps you understand which versions are available in your distribution’s repository and which one you have installed.

3. Using the strings command on Libraries (Linux)

  1. Press Ctrl + Alt + T to open the terminal.
  2. Run the Command:
    • Navigate to the directory where your OpenSSL libraries are located, usually /usr/lib/ssl
    • Run strings libcrypto.so | grep "^OpenSSL \S\+ [0-9]\+ \S\+ [0-9]\+"

This will output the version of the OpenSSL library directly from the binary. This solution is useful if you have multiple OpenSSL installations or need to verify the OpenSSL version bundled with an application.

4. Programmatic check in C++

  1. Include the necessary OpenSSL headers in your C++ code.
  2. Code snippet: #include <openssl/opensslv.h> #include <iostream> int main() { std::cout << SSLeay_version(SSLEAY_VERSION) << std::endl; return 0; }
  3. Compile your program with an OpenSSL-linked compiler and run the executable.

This program will print the OpenSSL version used in your C++ application. This solution helps developers programmatically check the OpenSSL version used in their applications, which is particularly useful during development and debugging.

By following these solutions, you can easily check the OpenSSL version on various systems and contexts. Regularly checking your OpenSSL version helps ensure your system’s security and functionality. Always keep your software updated to protect against vulnerabilities.

If the Windows Terminal won’t open, click this highlighted link for ways to fix it quickly. You might also be interested in reading our guide on how to create a self-signed certificate in Windows.

For any other questions or suggestions, go to the comments section below and drop a line.

More about the topics: Windows Terminal

User forum

0 messages