TOOLS
SSL diagnostics for PowerShell, macOS and Linux
Build commands for your terminal, test a particular server and compare the certificate it returns. Choose Windows, macOS, Linux, WSL or Docker below.
Build your SSL test
Use curl.exe in Windows PowerShell to call the curl executable.
Check the HTTPS connection
curl.exe -V
curl.exe -Iv --connect-timeout 10 --max-time 20 https://www.example.com/
$LASTEXITCODE
Check www.example.com on port 443.
Read the certificate dates and fingerprint
Run the test step by step
- Choose your terminal and enter the website hostname. Use the same name your browser or application requests.
- Leave the IP field empty for a normal DNS lookup, or enter an address to test one listener. Set the HTTPS port if the service uses a port other than 443.
- Copy the commands into that terminal. curl -V identifies the version and TLS backend; the next request shows the connection, verification result and HTTP headers.
- Open the certificate-details section to compare validity dates, issuer and SHA-256 fingerprint. Save the result with the peer IP and UTC time.
Read the result
| Result | Next step |
|---|---|
| curl exit code 0 | The request completed. Check the HTTP status and the endpoint shown in the output. |
| curl error 60 | Read the certificate-verification message, then check the chain, dates and hostname. |
| curl error 35 | Check the TLS handshake, destination listener and proxy settings. |
| HTTP 405 after successful TLS | The server may reject HEAD requests. Use -v instead of -Iv to send GET. Add -o NUL on Windows or -o /dev/null on macOS and Linux to discard the response body. |
PowerShell prints curl’s exit code through $LASTEXITCODE; Command Prompt uses %ERRORLEVEL%. In a POSIX shell, inspect $? immediately after the command.
Ready-to-use terminal examples
Windows PowerShell
Use curl.exe so Windows PowerShell calls curl rather than its curl alias. The certificate-details script uses .NET, which is available in PowerShell.
curl.exe -V
curl.exe -Iv --connect-timeout 10 --max-time 20 https://www.example.com/
$LASTEXITCODEWindows Command Prompt
Run these commands in Command Prompt. The certificate-details command needs OpenSSL on PATH.
curl.exe -V
curl.exe -Iv --connect-timeout 10 --max-time 20 https://www.example.com/
echo %ERRORLEVEL%macOS Terminal
Run in Terminal with curl and OpenSSL or LibreSSL available. Use curl -V and openssl version to identify the versions installed.
curl -V
curl -Iv --connect-timeout 10 --max-time 20 https://www.example.com/
printf 'curl exit code: %s\n' "$?"Linux shell
Run in a POSIX shell with curl and OpenSSL installed. Use your distribution’s packages if either command is missing.
curl -V
curl -Iv --connect-timeout 10 --max-time 20 https://www.example.com/
printf 'curl exit code: %s\n' "$?"Windows Subsystem for Linux
Run from PowerShell or Command Prompt with WSL installed. curl and OpenSSL must be installed in the default Linux distribution.
wsl.exe curl -V
wsl.exe curl -Iv --connect-timeout 10 --max-time 20 https://www.example.com/Docker
Docker must be running. These commands use the curl project’s curlimages/curl image and its CA store. Compare with your application image if only that container fails.
docker run --rm curlimages/curl:latest -V
docker run --rm curlimages/curl:latest -Iv --connect-timeout 10 --max-time 20 https://www.example.com/