Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You can do this easily with openssl:

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 you wish to use, omit -newkey rsa:2048 -sha1 -nodes and use -key myserver.key instead of -keyout ...)

You can inspect the CSR before you submit it with:

openssl req -in myserver.csr  -noout -text
share|improve this answer
    
Thank you. This worked brilliantly –  Zeutheus Jul 25 '13 at 13:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.