Skip to content

Instantly share code, notes, and snippets.

@mike-weiner
Created September 24, 2025 00:09
Show Gist options
  • Select an option

  • Save mike-weiner/11f9682b0197ff73d41ef4098602fece to your computer and use it in GitHub Desktop.

Select an option

Save mike-weiner/11f9682b0197ff73d41ef4098602fece to your computer and use it in GitHub Desktop.
Instructions to validate that a server's TLS certificate and key are a valid pair.

Validate TLS Server Certificate and Key Pair

This command starts a simple TLS/SSL server using OpenSSL.

openssl s_server -key server.key -cert server.crt -accept 8443

If the command runs successfully without errors, it indicates that the server key and certificate match and are valid. You can test the secure connection using:

openssl s_client -connect localhost:8443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment