生成具有2个OU名称的CSR [英] Generate CSR with 2 OU Names
问题描述
我必须创建一个生成CSR的应用程序.在生成CSR时,我们需要填写一些详细信息,例如CN,OU等.问题是我必须向其发送CSR的证书颁发机构需要2个OU(组织单位)名称.我在Google上搜索了很多,但是无法使用openssl或java keytool来指定2个OU名称.
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.
有人可以告诉我在生成CSR时如何指定2个OU名称吗?
Can someone please tell me how I can specify 2 OU Names while generating the CSR?
推荐答案
如果要通过CLI进行操作,则可以使用conf文件或传递-subj参数.这是-subj
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"
您可以添加ST,L,C和其他任何OpenSSL可以识别的shortName(以及原始OID).
You can add in ST, L, C, and any other shortName OpenSSL recognizes (along with raw OIDs).
这篇关于生成具有2个OU名称的CSR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!