【问题标题】:Apache SSL Certificate configuration - sec_error_inadequate_cert_typeApache SSL 证书配置 - sec_error_inadequate_cert_type
【发布时间】:2013-08-16 00:03:23
【问题描述】:

我想我的 SSL 证书有点搞砸了。 我们为所有 OpenVPN 客户端使用 SSL 证书(witch 完美运行),使用 easy-rsa 工具包生成。

现在我想为 OpenVPN 主机上的 Web 服务器使用相同的证书

所有密钥都是 4096 位长。

我的想法是 mybe 的使用目的对于 apache 是错误的,但我不太确定。

root@howard~# openssl x509 -in howard.example.com.crt -text -noout
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number: 15 (0xf)
    Signature Algorithm: sha1WithRSAEncryption
        Issuer: C=AT, ST=STMK, L=Graz, O=Bee Company, OU=Root CA, CN=example.com/name=rootca/emailAddress=root@bee.example.com
        Validity
            Not Before: Aug 13 12:36:41 2013 GMT
            Not After : Aug 11 12:36:41 2023 GMT
        Subject: C=AT, ST=STMK, L=Graz, O=example.com.at, OU=changeme, CN=howard.example.com/name=howard.example.com/emailAddress=root@example.com
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (4096 bit)
                Modulus:
                    NOTHING_TO_READ_HERE :)
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints:
                CA:FALSE
            Netscape Comment:
                Easy-RSA Generated Certificate
            X509v3 Subject Key Identifier:
                NOTHING_TO_READ_HERE :)
            X509v3 Authority Key Identifier:
                keyid:NOTHING_TO_READ_HERE :)
                DirName:/C=AT/ST=STMK/L=Graz/O=Bee Company/OU=Root CA/CN=example.com/name=rootca/emailAddress=root@bee.example.com
                serial:NOTHING_TO_READ_HERE :)

            X509v3 Extended Key Usage:
                TLS Web Client Authentication
            X509v3 Key Usage:
                Digital Signature
    Signature Algorithm: sha1WithRSAEncryption

当我使用 easy-rsa 工具包生成密钥时,我不知道如何更改/添加密钥的用途。

我在生成新的 OpenVPN 证书时所做的一切:

cd /usr/share/doc/openvpn/examples/easy-rsa/2.0/
vi vars
. ./vars
./build-key CLIENTNAME

在 vars 文件中我什么也找不到。

但是 Firefox 正在返回一个

sec_error_inadequate_cert_type

如果我真的信任这个证书,微软的 IE 只会一遍又一遍地提示我...

对我做错了什么或我需要做什么有什么想法吗?

我的想法是 apache 无法处理 4096 位密钥...

【问题讨论】:

    标签: linux apache ssl certificate ssl-certificate


    【解决方案1】:

    您的密钥用法和扩展密钥用法显然不适用于 TLS 服务器:

            X509v3 Extended Key Usage:
                TLS Web Client Authentication
            X509v3 Key Usage:
                Digital Signature
    

    对于 Web 服务器,您显然需要“TLS Web 服务器身份验证”扩展密钥用法。

    对于密钥用法,不太明显,但您也需要密钥加密。

    更多细节:

    【讨论】:

    • 谢谢,但你有一个简短的提示,我将如何使用我正在使用的 easy-rsa 工具包创建证书?或者应该如何手动创建一个新证书(使用openssl),女巫可以为所有目的的OpenVPN服务并作为(Web)服务器证书?
    • 我不确定easy-rsa,但也许你可以试试XCA,你会发现它更容易使用。
    • 谢谢你!如果我有足够的声誉分数,我会投票给你 :)
    【解决方案2】:

    实际上,您可以使用 easy-rsa 执行此操作 - 只需使用 build-key-server 而不是 build-key

    【讨论】:

    • 感谢您的提示,这是我的问题的额外解决方案(我自己造成的:))
    【解决方案3】:

    我也遇到了同样的问题,但是通过使用 OpenVPN easyrsa 中包含的 openssl.config 我发现您可以使用 ./build-key-server 脚本(对不起,如果我不准确,但我正在使用OpenVPN over Windows)就像一个魅力:)

    【讨论】:

      猜你喜欢
      • 2017-05-25
      • 1970-01-01
      • 2020-04-24
      • 2021-07-30
      • 2015-05-15
      • 2013-10-12
      • 2017-03-05
      • 1970-01-01
      • 2010-09-21
      相关资源
      最近更新 更多