gpt4 book ai didi

ubuntu - 当国家代码为 2 个字母时,使用 openssl 创建证书会引发 "maxsize"错误

转载 作者:行者123 更新时间:2023-12-04 18:29:44 26 4
gpt4 key购买 nike

运行

openssl req -config ./mokconfig.cnf \
-new -x509 -newkey rsa:2048 \
-nodes -days 36500 -outform DER \
-keyout "MOK.priv" \
-out "MOK.der"

与 mokconfig.cnf 包含
# This definition stops the following lines failing if HOME isn't
# defined.
HOME = .
[ req ]
distinguished_name = req_distinguished_name
x509_extensions = v3
string_mask = utf8only
prompt = no

[ req_distinguished_name ]
countryName = <US>
stateOrProvinceName = <Idaho>
localityName = <Boise>
0.organizationName = <Development>
commonName = Secure Boot Signing Key
emailAddress = <*MYEMAIL*>

[ v3 ]
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always,issuer
basicConstraints = critical,CA:FALSE
extendedKeyUsage = codeSigning,1.3.6.1.4.1.311.10.3.6
nsComment = "OpenSSL Generated Certificate"


哪个返回此错误
Generating a RSA private key
......................................................................................................................................................................+++++
..........................+++++
writing new private key to 'MOK.priv'
-----
problems making Certificate Request
140510219141568:error:0D07A097:asn1 encoding routines:ASN1_mbstring_ncopy:string too long:../crypto/asn1/a_mbstr.c:107:maxsize=2

根据我能收集到的和我研究过的,这是指具有 maxsize=2 的国家代码。正如您在配置文件中看到的,国家代码是“US”,即 2 个字符。

Ubuntu 18.04.3

我一定是错过了什么,但我看不到它,需要帮助

谢谢是提前

最佳答案

去掉国家代码周围的<>

关于ubuntu - 当国家代码为 2 个字母时,使用 openssl 创建证书会引发 "maxsize"错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58294573/

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