\n Hi All \n\ni have a requirement to generate csr file for two servers. i will generate using openssl. is it possible to add two Common Names in one single file or do i need to generate two different csrs one for Server01 and one for Server02. \n\nServer01: TestSrv01.mydomain.com \nCommon Name: TestSrv01 \n\nServer02: TestSrv02.mydomain.com \nCommon Name: TestSrv02 \n\nwill the below work for me. \n\n[req] \nprompt = no \ndistinguished_name = req_distinguished_name \nreq_extensions = v3_req \ndefault_md = sha256 \n…\n <\/blockquote>\n<\/aside>\n\nSome of your previous requests above, may help.<\/p>","upvoteCount":2,"datePublished":"2023-04-06T11:38:55.000Z","url":"https://community.spiceworks.com/t/generate-csr/949600/6","author":{"@type":"Person","name":"Rod-IT","url":"https://community.spiceworks.com/u/Rod-IT"}},{"@type":"Answer","text":"
I wrote up some instructions for creating SSL certificate requests and some tips as I have to replace about 30 SSL certificates per year. This process is used for all SSL certificates including Windows, Linux and other devices. I chose to use OpenSSL to create the request and convert the certificates. It’s fairly easy once you have the steps. I hope this helps someone:<\/p>\n
Create CNF configuration file on your Linux workstation or PC with OpenSSL installed:\n(Create a temporary folder and put the file in it…then run the commands below from that folder.)\n\nSample file below:\n____________________________________________________________\n\n[req]\n distinguished_name = req_distinguished_name\n req_extensions = v3_req\n prompt = no\n [req_distinguished_name]\n C = US\n ST = VA\n L = YourTown\n OU = Your Department\n O = My Company\n CN = host.company.com\n [v3_req]\n keyUsage = keyEncipherment, dataEncipherment\n extendedKeyUsage = serverAuth\n subjectAltName = @alt_names\n [alt_names]\n DNS.1 = host.company.com\n DNS.2 = host2.company.com\n\n____________________________________________________________\n\nCreate Certificate Request with .cnf file specs:\nopenssl req -config host.company.com.cnf -newkey rsa:4096 -nodes -sha256 -keyout host.company.com.key -out host.company.com.csr\n\nCheck SAN Entries:\nopenssl req -noout -text -in host.company.com.csr | grep DNS\n\nProcess certificate request on DigiCert's website or with Windows Certificate Services and download the new certificate files.\n\nChain the Root and Intermediate certificates if needed:\nOpen the DigiCertCA.crt and the TrustedRoot.crt files with Notepad and add them to a new empty text file called certchain.txt\nThe Root certificate stays at the top of the text file and the intermediate certs can be added below. Rename the file certchain.crt\nThis will help with the next section as you convert the certificates to a single PFX file. (Not needed for most Linux certificates.)\n\nCreate Single PFX file with all certificates chained and a password:\nopenssl pkcs12 -export -out host.company.com.pfx -inkey host.company.com.key -in host.company.crt -certfile certchain.crt -name Host2023.company.com (Give the PFX file a password.)\n\nCopy the PFX or the other the Crt, Key or Root Crt files to a temporary folder on your hard drive or on the server.\nThe Windows Servers and many devices will take a single PFX file with all certificates chained. (Be sure to remember the password for the PFX file.) \nIt is easy to import the single .pfx file to the local server Windows Certificate Store.\n\nThe Linux Servers will usually want an individual \".key\" file, an individual \".crt\" file and the root \".crt\" file.\nMost of the time the \"apache.conf\" file specifies where the new files need to be located\n\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2023-04-06T13:40:08.000Z","url":"https://community.spiceworks.com/t/generate-csr/949600/7","author":{"@type":"Person","name":"mjames2","url":"https://community.spiceworks.com/u/mjames2"}},{"@type":"Answer","text":"Try OpenSSL for this.<\/p>\n
openssl req -new -subj \"/C=Country/ST=State/L=Location/O=Contoso/CN=url1.contoso.com\" -addext \"subjectAltName = DNS:url1.contoso.com,DNS:url2.contoso.com\" -newkey rsa:2048 -keyout url.contoso.com-key.pem -out url.contoso.com.csr\n<\/code><\/pre>","upvoteCount":0,"datePublished":"2023-07-21T09:02:05.000Z","url":"https://community.spiceworks.com/t/generate-csr/949600/8","author":{"@type":"Person","name":"sneharani","url":"https://community.spiceworks.com/u/sneharani"}}]}}