Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate CSR with 2 OU Names

I have to create an application which generates a CSR. While generating a CSR we are required to fill in several details like CN, OU, etc. The problem is that the Certifying Authority to which I have to send my CSR wants 2 OU(Organizational Unit) Names. I googled a lot but couldn't find anything using either openssl or java keytool by which I can specify 2 OU Names.

Can someone please tell me how I can specify 2 OU Names while generating the CSR?

like image 905
DanMatlin Avatar asked Jul 25 '13 05:07

DanMatlin


People also ask

How do you add alternative names to CSR?

By adding DNS. n (where n is a sequential number) entries under the “subjectAltName” field you'll be able to add as many additional “alternate names” as you want, even not related to the main domain.

How do you generate CSR with San names?

Create a CSR for a SAN certificateOpen the command prompt as an administrator and change the directory to C:\OpenSSL-WinXX\bin. Generate the CSR and KEY file with this command. Enter the details to complete the CSR. Common Name must be the FQDN of the inSync master server.

Can we generate multiple CSR from any server?

You can generate the CSR from any server you like, but the final certificate must then be installed on the same server. (The private key that matches the CSR is on that server.)


1 Answers

If you want to do it via CLI you can use either a conf file or pass the -subj argument. Here's an example with -subj

openssl req -new -newkey rsa:2048 -nodes -subj "/CN=somedomain.com/O=My Corporation/OU=Org Unit 1/OU=Org Unit 2"

You can add in ST, L, C, and any other shortName OpenSSL recognizes (along with raw OIDs).

like image 77
Paul Kehrer Avatar answered Sep 21 '22 00:09

Paul Kehrer