gpt4 book ai didi

Openssl invalid_purpose

转载 作者:行者123 更新时间:2023-12-04 23:06:07 25 4
gpt4 key购买 nike

Openssl 生成 invalid_purpose 时会查看哪些证书字段?

我正在使用 OpenSSL 生成证书。

首先我生成一个主证书,然后是客户端证书。现在,当我尝试连接服务器时,它会生成 Invalid_Purpose。

最佳答案

有分机 keyUsage它指定了证书可以做什么。请注意,某些程序不使用此字段。

来自 X509 文档:

X509_V_ERR_INVALID_PURPOSE: unsupported certificate purpose
the supplied certificate cannot be used for the specified purpose.

手册页 x509v3_config(5)列出参数以及另一个名为 extendedKeyUsage 的可能值:
Key Usage.
Key usage is a multi valued extension consisting of a list of names of
the permitted key usages.

The supporte names are: digitalSignature, nonRepudiation,
keyEncipherment, dataEncipherment, keyAgreement, keyCertSign, cRLSign,
encipherOnly and decipherOnly.

Examples:
keyUsage=digitalSignature, nonRepudiation
keyUsage=critical, keyCertSign

Extended Key Usage.
This extensions consists of a list of usages indicating purposes for
which the certificate public key can be used for,

These can either be object short names of the dotted numerical form of
OIDs. While any OID can be used only certain values make sense. In
particular the following PKIX, NS and MS values are meaningful:

Value Meaning
----- -------
serverAuth SSL/TLS Web Server Authentication.
clientAuth SSL/TLS Web Client Authentication.
codeSigning Code signing.
emailProtection E-mail Protection (S/MIME).
timeStamping Trusted Timestamping
msCodeInd Microsoft Individual Code Signing (authenticode)
msCodeCom Microsoft Commercial Code Signing (authenticode)
msCTLSign Microsoft Trust List Signing
msSGC Microsoft Server Gated Crypto
msEFS Microsoft Encrypted File System
nsSGC Netscape Server Gated Crypto

Examples:
extendedKeyUsage=critical,codeSigning,1.2.3.4
extendedKeyUsage=nsSGC,msSGC

关于Openssl invalid_purpose,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11884731/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com