gpt4 book ai didi

ssl - OpenSSL 无法建立 SSL 连接,因为不支持的协议(protocol)

转载 作者:行者123 更新时间:2023-12-04 22:35:52 65 4
gpt4 key购买 nike

我正在尝试从 here 构建 OpenCog当我发出这个命令时

octool -rdcpav -l default

它构建所有内容,但随后进入安装 Link-Grammar 的步骤,这发生了

[octool] Installing Link-Grammar....
--2020-06-13 10:09:36-- http://www.abisource.com/downloads/link-grammar/current/
Resolving www.abisource.com (www.abisource.com)... 130.89.149.216
Connecting to www.abisource.com (www.abisource.com)|130.89.149.216|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://www.abisource.com/downloads/link-grammar/current/ [following]
--2020-06-13 10:09:37-- https://www.abisource.com/downloads/link-grammar/current/
Connecting to www.abisource.com (www.abisource.com)|130.89.149.216|:443... connected.
OpenSSL: error:1425F102:SSL routines:ssl_choose_client_version:unsupported protocol
Unable to establish SSL connection.

我在 ubuntu 20.04 LTS 上

最佳答案

www.abisource.com 仅支持 TLS 版本 1.0,该版本现已损坏(或至少被削弱)并且已经过时。根据它的 header ,它是 Apache 2.2.15 (Fedora),它的日期是 2010 年!

因此这似乎是与 OpenSSL v1.1.1 ssl_choose_client_version unsupported protocol 相同的问题除了 Ubuntu 而不是 Debian 和 wget(由 octool 使用)而不是 openvpn。在那里尝试接受的答案:编辑 [system_default_sect] 下的 /etc/ssl/openssl.cnf 以降级 MinProtocol=TLSv1 和可能的 CipherString=DEFAULT:@SECLEVEL=1 -- 服务器的 DHE key 是 1k,我不记得这是否适用于 2 级,尽管它的证书是荒谬的 RSA 4k!

更新: 好吧,我下载并安装了 Ubuntu 20.04,包括 libssl1.1 的源代码并查看了它,他们没有保留 Debian 的方法,他们改变了它。具体来说,他们没有更改 openssl.cnf 文件以要求 TLSv1.2,而是他们编译 OpenSSL/libssl 以制作默认 SECLEVEL 2 让 SECLEVEL 2 强制 TLSv1.2(它不是上游)。

但是,您仍然可以通过添加所需的(弱)配置到 openssl.cnf 来修复它:

  • 在默认部分的某处,即在以 [ 开头的第一行之前,添加一行

    openssl_conf = openssl_configuration

    我喜欢把它放在最上面,但那只是我。

  • 从技术上讲,在任何部分边界处添加三个新部分,但最简单的方法是在末尾添加三个新部分:

    [openssl_configuration]
    ssl_conf = ssl_configuration
    [ssl_configuration]
    system_default = tls_system_default
    [tls_system_default]
    CipherString = DEFAULT:@SECLEVEL=1

请注意,由于 MinProtocol 还不存在,因此您无需添加它(代码默认值没问题),但如果您愿意,也可以添加。

现在可以了:

$ wget https://www.abisource.com/
--2020-06-20 05:11:11-- https://www.abisource.com/
Resolving www.abisource.com (www.abisource.com)... 130.89.149.216
Connecting to www.abisource.com (www.abisource.com)|130.89.149.216|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7687 (7.5K) [text/html]
Saving to: ‘index.html’

index.html 100%[===================>] 7.51K --.-KB/s in 0.002s

2020-06-20 05:11:12 (3.90 MB/s) - ‘index.html’ saved [7687/7687]

正如您所说,这是一个全局性的变化。您可以针对此特定操作更改它,方法是编辑您的 octool 副本以将选项 --ciphers=DEFAULT:@SECLEVEL=1 添加到 wget 命令。用原来的openssl.cnf:

$ wget --ciphers=DEFAULT:@SECLEVEL=1 https://www.abisource.com/
--2020-06-20 05:15:21-- https://www.abisource.com/
Resolving www.abisource.com (www.abisource.com)... 130.89.149.216
Connecting to www.abisource.com (www.abisource.com)|130.89.149.216|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7687 (7.5K) [text/html]
Saving to: ‘index.html.1’

index.html.1 100%[===================>] 7.51K --.-KB/s in 0s

2020-06-20 05:15:22 (330 MB/s) - ‘index.html.1’ saved [7687/7687]

关于ssl - OpenSSL 无法建立 SSL 连接,因为不支持的协议(protocol),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62357205/

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