
I have also added the value for individual distinguished_name parameters in this configuration file to avoid user prompt. To generate CSR for SAN we need distinguished_name and req_extensions We will not use the complete /etc/pki/tls/openssl.cnf instead we will create our own custom ssl configuration file with required parameters only. ++++ĪLSO READ: Setup & verify mutual TLS authentication (MTLS) with openssl Generate CSR for SAN Certificate Generating RSA private key, 4096 bit long modulus (2 primes) I have not assigned any passphrase to the private key, you can also use -des3 encryption algorithm to add a passphrase to your private key # openssl genrsa -out server.key 4096 Now I could have combined the steps to generate private key and CSR for SAN but let's keep it simple. You can collect my sample openssl.cnf from a different article.įirst of all we need a private key. Openssl x509 -noout -text -in certs/cacert.pem # Verify the rootCA certificate content and X.509 extensions Openssl req -new -x509 -days 3650 -config openssl.cnf -key private/cakey.pem -out certs/cacert.pem Openssl genrsa -out private/cakey.pem 4096 I will share the commands to create the same, but if you are interested then you should check other articles on similar topic from the LEFT Sidebar MENU: # create a directory structure for storing the rootca certificates I have already created these certificates to demonstrate this article. We will need RootCA certificate and Private key to sign the certificates. It is using a Subject Alternative Name with multiple DNS defined in the certificate so it avoids creating multiple certificate for each sub domain.ĪLSO READ: OpenSSL create self signed certificate Linux with example For example have a look at the certificate of.This single certificate can be installed on a web server and used to validate traffic for any of the DNS names that are contained in the certificate.Once issued, the SAN certificate will contain a primary DNS name, which is typically the main name of the website, and, further inside the cert properties, you will find listed the additional DNS names that you specified during your request.When you request a SAN certificate, you have the option of defining multiple DNS names that the certificate can protect.


SAN is an acronym for Subject Alternative Name.What are SAN (Subject Alternative name) Certificates In this tutorial we will learn about SAN certificates and steps to generate CSR for SAN certificates. Re-verify the SAN Extensions in the certificate.Generate SAN Certificates with X509 extensions.

Missing SAN Extensions from the Certificate.Verify SAN Extensions in the certificate.Verify Subject Alternative Name value in CSR.What are SAN (Subject Alternative name) Certificates.
