How to Generate CSR with 2 OU Names
If you need to generate a CSR (Certificate Signing Request) with 2 OU (Organizational Unit) Names, you can easily do this using openssl. When generating a CSR, you may be required to provide various details such as CN (Common Name), OU, etc. However, some Certifying Authorities may specifically ask for 2 OU Names. Here’s how you can achieve it:
Using openssl
To generate a CSR with 2 OU Names using openssl, use the following command:
openssl req -new -out myserver.csr -newkey rsa:2048 -sha1 -nodes -keyout myserver.key -subj "/C=US/ST=New York/L=New York/O=My Company/OU=1st OU/OU=2nd OU/CN=www.myserver.net"
If you already have a key that you want to use, you can omit the -newkey rsa:2048 -sha1 -nodes
options and use -key myserver.key
instead of -keyout ...
.
Inspecting the CSR
Before submitting the CSR, you can inspect its contents using the following command:
openssl req -in myserver.csr -noout -text