How to create a sample self-signed certificate with SAN using OpenSSL

This article is applied to Web Browsers (Chrome, Firefox, etc.) releases deployed on Windows Linux and macOS systems. It is required to use OpenSSL verasion 3.x to execute these steps.

Issue:

Modern web browsers require a Subject Alternative Name (SAN) in SSL/TLS certificates. The Common Name (CN) field, historically used for hostname verification, is deprecated due to compatibility and security concerns. Browsers reject certificates lacking SAN with errors like: “Certificate is not valid for the name.”

Affected Version/Platforms: Chrome 58 and later, Firefox, and other modern web browsers.

Resolution: To create an sample SSL/TLS certificate for testing purposes with a Subject Alternative Name (SAN), follow these steps:

  1. Create the san.cnf Configuration File:
Copy
  1. Generate the CSR and Private Key:
Copy
  1. (Optional) Verify SAN Entries:
Copy
  1. Create the Self-Signed Certificate:
Copy

Prevention: In case there are issues with a certificate provided from a CA, testing with a self signed certificate can help with the troubleshooting process.

If Further Assistance is required, please proceed to log a support case or chatting with our support engineer.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard