Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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/"

(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 – DanMatlin Jul 25 '13 at 13:49

Your Answer


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.