gpt4 book ai didi

ssl - 打开 :invalid type in 'policy' configuration

转载 作者:太空宇宙 更新时间:2023-11-03 12:57:02 25 4
gpt4 key购买 nike

我想为我的本地开发服务器获得一个自签名的 SSL 证书。我正在按照 https://help.ubuntu.com/community/OpenSSL 上的指南进行操作并在最后一步发出命令以通过发出以下命令来签署证书:

openssl ca -in tempreq.pem -out server_crt.pem

我收到以下错误:(最后一行)

Using configuration from /home/user_name/.ssl/caconfig.cnf
Enter pass phrase for /home/user_name/.ssl/private/cakey.pem:
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
commonName :PRINTABLE:'localhost'
stateOrProvinceName :PRINTABLE:'AA'
countryName :PRINTABLE:'ET'
emailAddress :IA5STRING:'user@example.com'
organizationName :PRINTABLE:'Example Inc'
organizationalUnitName:PRINTABLE:'Development'
localhost:invalid type in 'policy' configuration

我能做些什么来解决它?作为背景,我的服务器没有域名,所以我只使用 localhost 作为 commanName。是这个问题吗?

感谢您的帮助。

最佳答案

  1. 将策略从/etc/ssl/openssl.cnf 复制到您的配置文件

  2. 从头开始重建所有文件

  3. 政策部分如下:

    policy          = policy_match    # For the CA policy    [ policy_match ]    countryName             = match    stateOrProvinceName     = match    organizationName        = match    organizationalUnitName  = optional    commonName              = supplied    emailAddress            = optional    # For the 'anything' policy    # At this point in time, you must list all acceptable 'object'    # types.    [ policy_anything ]    countryName             = optional    stateOrProvinceName     = optional    localityName            = optional    organizationName        = optional    organizationalUnitName  = optional    commonName              = supplied    emailAddress            = optional

关于ssl - 打开 :invalid type in 'policy' configuration,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6649935/

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