如何使用OpenSSL创建这样的CSR?

发布于 2025-01-18 06:38:55 字数 1210 浏览 3 评论 0原文

我得到了一些客户的企业社会责任示例。他们询问如何使用OpenSSL命令创建此类CSR。我可以创建一个CSR,但我无法创建一个包含相同属性部分的类似CSR。

Certificate Request:
    Data:
        Version: 2 (0x1)
        Subject: DC = WAPI, C = CN, O = HTKC001, OU = HTKC002, CN = HTKC002@AE
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
            Unable to load Public Key
6768:error:100D7010:elliptic curve routines:eckey_pub_decode:EC lib:../openssl-1.1.1d/crypto/ec/ec_ameth.c:151:
6768:error:0B09407D:x509 certificate routines:x509_pubkey_decode:public key decode error:../openssl-1.1.1d/crypto/x509/x_pubkey.c:125:
        Attributes:
            2.16.840.1.113732.2      :40:77:a9:a3:bb:f0
    Signature Algorithm: 1.2.156.11235.1.1.1
         30:35:02:19:00:af:0f:99:40:60:7d:8d:50:a6:43:27:41:01:
         32:c3:f3:67:bf:b8:db:1f:89:8f:f9:02:18:6f:77:3d:7a:af:
         fe:c1:fa:7b:cf:f5:c8:2e:ac:39:e2:04:d7:19:7e:10:39:8b:
         29

这是我尝试过的命令:

openssl req -new -key server.key -out server.csr -sha256 -addext "2.16.840.1.113732.2 = 00:11:22:33:44:55"

openssl req -new -key server.key -out server.csr -sha256 -reqexts "2.16.840.1.113732.2=00:11:22:33:44:55"

因为我遇到了错误。

I got a CSR example from some customer. They are asking how to use openssl command to create such CSR. I can create an CSR but I can't create a similar CSR that containing same attributes part.

Certificate Request:
    Data:
        Version: 2 (0x1)
        Subject: DC = WAPI, C = CN, O = HTKC001, OU = HTKC002, CN = HTKC002@AE
        Subject Public Key Info:
            Public Key Algorithm: id-ecPublicKey
            Unable to load Public Key
6768:error:100D7010:elliptic curve routines:eckey_pub_decode:EC lib:../openssl-1.1.1d/crypto/ec/ec_ameth.c:151:
6768:error:0B09407D:x509 certificate routines:x509_pubkey_decode:public key decode error:../openssl-1.1.1d/crypto/x509/x_pubkey.c:125:
        Attributes:
            2.16.840.1.113732.2      :40:77:a9:a3:bb:f0
    Signature Algorithm: 1.2.156.11235.1.1.1
         30:35:02:19:00:af:0f:99:40:60:7d:8d:50:a6:43:27:41:01:
         32:c3:f3:67:bf:b8:db:1f:89:8f:f9:02:18:6f:77:3d:7a:af:
         fe:c1:fa:7b:cf:f5:c8:2e:ac:39:e2:04:d7:19:7e:10:39:8b:
         29

Here is the command I tried :

openssl req -new -key server.key -out server.csr -sha256 -addext "2.16.840.1.113732.2 = 00:11:22:33:44:55"

openssl req -new -key server.key -out server.csr -sha256 -reqexts "2.16.840.1.113732.2=00:11:22:33:44:55"

for both I got errors.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

绾颜 2025-01-25 06:38:55
[ new_oids ]
....
xxxxx  = 1.2.3.4.5

[ req_attributes ]
....
xxxxx  = enter your new item xxxxx

最终,我更改了我的饱和文件,并解决了问题。

[ new_oids ]
....
xxxxx  = 1.2.3.4.5

[ req_attributes ]
....
xxxxx  = enter your new item xxxxx

Finally I changed my configration file ,and fixed my problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文