生成自签名证书时,Req 中出现 OpenSSL 错误

3

我创建了一个CSR文件eidas.csr,内容如下:

    oid_section = OIDs

[ req ]
distinguished_name = dn
prompt = no

[ OIDs ]
OrganizationID=2.5.4.97

[ dn ]
O=Enable Banking Oy
L=Espoo
C=FI
OrganizationID=PSDFI-FINFSA-29884997
CN=enablebanking.com

我运行了以下命令: openssl req -new -config eidas.conf -keyout eidas.key -out eidas.csr 然后我得到了以下错误:
problem creating object OrganizationID=2.5.4.97
140676474279104:error:08064066:object identifier routines:OBJ_create:oid exists:../crypto/objects/obj_dat.c:709:
error in req

第一台电脑: OpenSSL 1.1.1d,2019年9月10日发布

操作系统:发行版ID:Kali 描述:Kali GNU/Linux Rolling 版本:2020.1 代号:kali-rolling

第二台电脑: OpenSSL 1.1.1h,2020年9月22日发布 操作系统:Windows 10 Professional

然而,如果我更改Oid声明的Line 2.5.4.97为1.2.3.4,则成功

1个回答

4
在较新版本的openssl中,OID 2.5.4.97被保留用于组织标识符(organizationIdentifier),因此您可以将eidas.conf更改为以下内容,然后应该可以正常工作。
[ req ]
distinguished_name = dn
prompt = no

[ dn ]
O=Enable Banking Oy
L=Espoo
C=FI
organizationIdentifier=PSDFI-FINFSA-29884997
CN=enablebanking.com

同时请注意 [dn] 部分的值。 显然,您从 https://enablebanking.com/blog/2020/01/13/how-to-generate-eidas-certificate/ 复制了 eidas.conf 文件,并且该值仅作为示例给出,您可能希望更改这些值以描述自己的组织、位置和域名(尽管对于 psd2 沙箱,任何值都可能有效)。


1
谢谢,工作得非常好。我在哪里可以找到保留的OIDs? - giorgiAsanidze
@giorgiAsanidze 很好!不幸的是,我不知道。 - Fedor

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接