Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

There are two different TLS checks you may need to perform on Linux:

  1. Identify the TLS libraries and protocol versions available locally.
  2. Find the TLS version negotiated with a particular remote service.

The second check is usually the important one. Running openssl version tells you which OpenSSL build is installed; it does not tell you whether a website connection used TLS 1.2 or TLS 1.3.

This guide covers HTTPS, exact-version tests, curl, STARTTLS services such as SMTP and IMAP, and broader scans with Nmap.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Check the installed OpenSSL and curl versions

Start by checking the local TLS tools:

openssl version -a
curl --version

The -a option displays the OpenSSL version, build date, compiler details, platform, configuration directory, and module directory. For example:

Popular on Amazon
Identiv SCR3310V2 USB Smart Card Reader Writer CAC/PIV
  • Fully Compliant - Complies With All Major Industry Standards, Including Iso/Iec 7816, Usb Ccid, Pc/Sc, And Microsoft Whql. As Well As, Emv 2011 Ver 4.3 Level 1 And Gsa Fips 201.
  • Seamless Integration - With Identiv-Specific Smartos You’Ll Get Easy, Complete Support Of All Major Contact Smart Card Ics And Technologies In One Simple Reader.
  • Universal Compatibility - Works With Virtually All Contact Chip Cards And Pc Operating Systems, Including Windows, Macos, Linux And Android.
  • Fast And Convenient- Shorten Your Transaction Time With A Reader That’S Optimized For Speed. It’S Ultra-Compact And Robust Design Is Streamlined For Mobile Operation, Making This Reader The Best Choice For Convenience, Security And Reliability.
  • Ergonomic and cost efficient design
OpenSSL 3.5.0 ...
built on: ...
platform: ...
OPENSSLDIR: ...
MODULESDIR: ...

This is a local software check, not a test of a remote server’s TLS configuration. The curl --version output is also useful because it shows which TLS backend that particular curl binary uses, such as OpenSSL, GnuTLS, wolfSSL, or another library.

2. Check the negotiated TLS version with OpenSSL

For a normal HTTPS service, run:

openssl s_client 
  -connect example.com:443 
  -servername example.com 
  -brief </dev/null

Look for a line similar to:

Protocol version: TLSv1.3

This is the TLS version negotiated for that connection. You may instead see TLSv1.2, depending on the server, client library, and local security policy.

The -servername option is important. It sends the hostname using Server Name Indication (SNI), allowing a server hosting multiple websites on one IP address to select the correct certificate and TLS configuration. Without it, you may test the server’s default virtual host rather than the site you intended to check.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The -brief option reduces the amount of diagnostic output. A successful connection may include output such as:

CONNECTION ESTABLISHED
Protocol version: TLSv1.3
Ciphersuite: TLS_AES_256_GCM_SHA384

Use an HTTP request when s_client does not exit

Some servers keep the TLS connection open while waiting for application data. A simple </dev/null test can therefore appear to hang or close before the session is fully useful. Send an HTTP request with an explicit connection close instead:

printf 'GET / HTTP/1.1rnHost: example.comrnConnection: closernrn' |
  openssl s_client 
    -connect example.com:443 
    -servername example.com 
    -brief

The TLS summary appears before the HTTP response. This command checks the TLS handshake and then makes a normal HTTPS request.

Check an IPv6 endpoint

When connecting directly to an IPv6 address, put the address in square brackets:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
openssl s_client 
  -connect '[2001:db8::10]:443' 
  -servername example.com 
  -brief </dev/null

Keep the hostname in -servername even when connecting to an IP address. The IP determines where the connection goes; SNI determines which hostname configuration the server should use.

3. Check the TLS version with curl

curl is convenient when you want to test the same type of connection an application or script might make:

Also popular on Amazon
Sale
LATNEX AF-3500 EMF Meter RF Detector and Reader with Calibration Certificate - Measures RF and Microwaves, 3-Axis Gauss Magnetic Fields and Electrical Fields ELF
  • [ Versatile EMF Measurement ] This EMF meter is a multifunctional device designed to measure a wide range of electromagnetic fields, including RF EMF, low-frequency magnetic fields, and electrical fields
  • [ All in One RF EMF Meter and Detector ] - with Calibration Certificate - this is a reliable meter for measuring RF and LF Radiation from sources such as Cell Phones, Cell Towers, Smart meters, Wifi modems, High Power Lines, Appliances, Electrical Boxes, and Wires. The AF-3500 measures high-frequency electromagnetic fields (RF) in a frequency range of 50MHz - 3.5GHz and low frequency electric and magnetic fields (EMF) at 50-60Hz.
  • [ Impressive design, quality, and alarm function ] - Features a large screen and intuitive buttons for easy toggling between RF, Electrical, and Gauss Meter modes. The built-in alarm function ensures simple operation for beginners, seniors, and advanced users alike
  • [ Outlined Features ] - RF Detector or RF Meter Mode - 50MHz~3.5GHZ; EMF Meter or EMF Reader for Electrical Field up to 2000V/M; Gauss EMF Meter 3-axis fields sensor; Manual data memory (Max & AVG) records, Alarm function with ON/ OFF
  • [ Comprehensive Package ] Your purchase includes both technical support and a 1-year warranty. We're here for you via phone and email through Amazon Messages, and you'll find a user manual for added convenience. This guarantees a secure investment and makes it a meaningful gift for any special occasion like holidays, birthdays, anniversaries, Mother's Day, or Father's Day
curl -sSvo /dev/null https://example.com

In the verbose output, find a line like:

* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384

To show only the relevant line:

curl -sSvo /dev/null https://example.com 2>&1 |
  grep -E 'SSL connection using|TLSv[0-9]'

This result describes the TLS backend used by this curl installation. Two Linux machines can produce different results for the same website if their curl binaries use different libraries or have different system crypto policies.

Important: curl version options set a minimum by default

A commonly repeated command is:

curl --tlsv1.2 https://example.com

With current curl behavior, --tlsv1.2 means TLS 1.2 or newer. If TLS 1.3 is available, curl can still negotiate TLS 1.3. It is not an exact TLS 1.2 test.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To test exactly TLS 1.2, set both the minimum and maximum:

curl --tlsv1.2 --tls-max 1.2 -sSvo /dev/null https://example.com

To test exactly TLS 1.3:

curl --tlsv1.3 --tls-max 1.3 -sSvo /dev/null https://example.com

The same minimum-and-maximum pattern applies when testing older versions, if your curl build and local security policy permit them.

4. Test one exact TLS version with OpenSSL

OpenSSL provides protocol-specific options that restrict the handshake to one version:

openssl s_client 
  -connect example.com:443 
  -servername example.com 
  -tls1_2 
  -brief </dev/null

For TLS 1.3:

openssl s_client 
  -connect example.com:443 
  -servername example.com 
  -tls1_3 
  -brief </dev/null

Available flags commonly include:

-tls1
-tls1_1
-tls1_2
-tls1_3

If the output contains Protocol version: TLSv1.2 or Protocol version: TLSv1.3, that exact version successfully negotiated. A handshake failure means the test did not succeed, but it does not always prove that the remote server lacks the version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run a compact compatibility test

This loop attempts each commonly referenced TLS version and prints the first useful result:

for version in -tls1 -tls1_1 -tls1_2 -tls1_3; do
  printf '%-8s ' "$version"
  timeout 10 openssl s_client 
    -connect example.com:443 
    -servername example.com 
    "$version" </dev/null 2>&1 |
    grep -m1 -E 'Protocol version:|Cipher is|handshake failure|alert protocol version|no protocols available|unknown option'
done

Interpret the output as follows:

Output Meaning
Protocol version: TLSv1.2 or TLSv1.3 The selected version successfully negotiated.
handshake failure or alert protocol version The handshake failed for that test.
no protocols available The local OpenSSL configuration or security policy disabled the requested protocol.
unknown option The installed OpenSSL is too old to recognize the option, or the build lacks the feature.

Be especially cautious with TLS 1.0 and TLS 1.1. Current Linux distributions commonly disable these protocols through OpenSSL security levels or system-wide cryptographic policies. Therefore, a failed TLS 1.0 test from a modern workstation may reflect the local client policy rather than the server’s actual capabilities.

5. Check TLS on STARTTLS services

SMTP, IMAP, POP3, PostgreSQL, and several other services begin with a plaintext protocol exchange and then upgrade the same connection to TLS. Testing them as if they were HTTPS can produce errors such as wrong version number.

Also popular on Amazon
Slim Mini Size Waterproof Wiegand 26/34 125KHz EM RFID Reader for Door Access Control Proximity RFID Reader Black Color
  • Card Type: EM-ID Card (Can't support HID, Cobra, APCiK etc)
  • Type: EM RFID 125khz reader, Can't work alone, Normally work with Control board/Fingerprint devcie/Master controller to build completely Security Access Control System.
  • Support Wiegand 26-Bit and Wiegand 34-Bit; Built-in LED (Double Color LED) and Loud Speaker (Buzzer).
  • WatherProof, Water Proof, can Install outside,Small and Beautiful Reader.
  • Intput Voltage: DC 9-15V, Can stable running for many years.

Use OpenSSL’s -starttls option and the protocol-specific keyword.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

SMTP on port 25

openssl s_client 
  -connect smtp.example.com:25 
  -starttls smtp 
  -servername smtp.example.com 
  -brief

SMTP submission on port 587

openssl s_client 
  -connect smtp.example.com:587 
  -starttls smtp 
  -servername smtp.example.com 
  -brief

IMAP and POP3

openssl s_client 
  -connect imap.example.com:143 
  -starttls imap 
  -servername imap.example.com 
  -brief
openssl s_client 
  -connect pop.example.com:110 
  -starttls pop3 
  -brief

PostgreSQL

openssl s_client 
  -connect db.example.com:5432 
  -starttls postgres 
  -brief

Other supported STARTTLS keywords include ftp, xmpp, irc, mysql, ldap, lmtp, nntp, and sieve.

SMTP servers can wait for a protocol-level quit command. Use this noninteractive form to close the session cleanly:

printf 'QUITrn' |
  openssl s_client 
    -connect smtp.example.com:25 
    -starttls smtp 
    -servername smtp.example.com 
    -brief 
    -ign_eof

6. Enumerate all versions with Nmap

Use Nmap when you need an inventory of the TLS versions and cipher suites a service accepts, rather than the result of one normal client connection:

nmap -sV --script ssl-enum-ciphers -p 443 example.com

The output groups accepted ciphers under protocol headings such as:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
TLSv1.2:
TLSv1.3:

The ssl-enum-ciphers script performs repeated connection attempts. Nmap classifies it as intrusive, so run it only against systems you own or are authorized to assess.

For an SNI-based virtual host, scan the IP address while supplying the hostname:

nmap -sV 
  --script ssl-enum-ciphers 
  --script-args tls.servername=example.com 
  -p 443 
  203.0.113.10

Nmap is better for a broad server inventory. OpenSSL or curl is generally the better choice when you only need to know which version a normal connection negotiated.

7. Check locally permitted TLS ciphers

To inspect the cipher suites usable under the current OpenSSL configuration, run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Also popular on Amazon
YARONGTECH® RFID Card Reader 13.56mhz USB M1 S50 Card Reader
  • Support 13.56mhz rfid card tag keyfob
  • Read the first 10 digits in Decimal format,such as "0040856688",if you buy the wrong format,please contact with us,we will send software to you to change the format
  • Applications: Identification; Access control, PC Access; Customizing cards; Payment; Anti-fake; Library management
  • USB Inteface,No external power source needed,Plug in and Play,so it doesn't need driver,just Plug USB into your computer,and the card number will read on the mouse
  • Compatible with: Windows 2000/XP/WIN 7/WIN 10/Vista
openssl ciphers -s -v

To examine a specific OpenSSL security level:

openssl ciphers -s -v 'DEFAULT:@SECLEVEL=2'

The -s option filters out ciphers that are known to OpenSSL but unavailable under the current protocol, security, or configuration constraints. This is still only a local check. It does not prove that a remote server accepts every cipher listed.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. Avoid confusing certificates with TLS versions

To display the certificates sent by a server:

openssl s_client 
  -connect example.com:443 
  -servername example.com 
  -showcerts </dev/null

-showcerts displays what the server sent; it does not prove that the chain is trusted or correctly validated.

For a stricter OpenSSL diagnostic test, make certificate errors abort the connection:

openssl s_client 
  -connect example.com:443 
  -servername example.com 
  -verify_return_error 
  -brief </dev/null

By default, s_client can continue after certificate-verification errors because it is primarily a diagnostic tool. Also, curl’s -k option only disables certificate verification. It does not change the negotiated TLS version.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

9. Troubleshoot common errors

Symptom Likely cause What to check
wrong version number The port is not speaking immediate TLS. Confirm the port and use -starttls if the service upgrades from plaintext.
handshake failure No compatible protocol, cipher, or signature algorithm; client authentication may also be required. Try a normal connection, then test exact versions and review server requirements.
tlsv1 alert protocol version The selected protocol was rejected by the server or an intermediary. Test another version and check local crypto policy.
no protocols available The local OpenSSL policy disabled the requested protocol. Inspect the distribution’s OpenSSL or system-wide cryptographic settings.
unknown option: -tls1_3 The OpenSSL installation is old or lacks the option. Run openssl version -a and update or use the available tool.
The wrong certificate appears SNI was omitted, or you tested an IP without specifying the hostname. Add -servername hostname.
s_client appears to hang The peer is waiting for application data or a protocol-level close. Send an HTTP request, QUIT, or use timeout.
curl reports that HTTPS is unsupported The curl binary was built without TLS support. Check curl --version and install a TLS-enabled package.

Recommended command for most HTTPS checks

For a practical one-command check, use:

printf 'GET / HTTP/1.1rnHost: example.comrnConnection: closernrn' |
  openssl s_client 
    -connect example.com:443 
    -servername example.com 
    -brief

Read the Protocol version line. To test compatibility with one exact version, repeat the command with -tls1_2 or -tls1_3. With curl, pair the minimum and maximum options, for example --tlsv1.2 --tls-max 1.2, so that TLS 1.3 cannot be selected accidentally.

FAQ

Does openssl version show the TLS version used by a website?

No. openssl version reports the installed OpenSSL implementation and build information. Use openssl s_client to see the protocol negotiated with a remote service.

How do I check whether a server supports TLS 1.2?

Run openssl s_client -connect example.com:443 -servername example.com -tls1_2 -brief </dev/null. A successful handshake with Protocol version: TLSv1.2 confirms that this client and server completed a TLS 1.2 connection.

Why does curl –tlsv1.2 sometimes connect with TLS 1.3?

In current curl versions, --tlsv1.2 sets TLS 1.2 as the minimum version. Add --tls-max 1.2 to make the test exact.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How can I check TLS for an SMTP server?

Use OpenSSL’s STARTTLS mode, such as openssl s_client -connect smtp.example.com:587 -starttls smtp -servername smtp.example.com -brief.

Why does TLS 1.0 fail on Linux even when the server may support it?

Modern Linux distributions often disable TLS 1.0 and TLS 1.1 through OpenSSL security levels or system-wide cryptographic policies. The failure may therefore come from the local client rather than the remote server.

The Bottom Line

Use openssl s_client with -servername to see the TLS version negotiated with a specific service. Use -tls1_2 or -tls1_3 for exact OpenSSL tests, and use curl’s minimum and maximum options together when testing an exact version. For STARTTLS protocols, add the appropriate -starttls keyword; for a complete server inventory, use Nmap’s ssl-enum-ciphers script.

Quick Recap

Bestseller No. 1
Identiv SCR3310V2 USB Smart Card Reader Writer CAC/PIV
Identiv SCR3310V2 USB Smart Card Reader Writer CAC/PIV
Ergonomic and cost efficient design; Software and functionality compatible with SCM´s SCR33xx readers family
$16.22
Bestseller No. 3
Slim Mini Size Waterproof Wiegand 26/34 125KHz EM RFID Reader for Door Access Control Proximity RFID Reader Black Color
Slim Mini Size Waterproof Wiegand 26/34 125KHz EM RFID Reader for Door Access Control Proximity RFID Reader Black Color
Card Type: EM-ID Card (Can't support HID, Cobra, APCiK etc); WatherProof, Water Proof, can Install outside,Small and Beautiful Reader.
$16.99
Bestseller No. 4
YARONGTECH® RFID Card Reader 13.56mhz USB M1 S50 Card Reader
YARONGTECH® RFID Card Reader 13.56mhz USB M1 S50 Card Reader
Support 13.56mhz rfid card tag keyfob; Compatible with: Windows 2000/XP/WIN 7/WIN 10/Vista
$16.88
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply. Prices as of November 23, 2026 7:44 am GMT.