gpt4 book ai didi

https - 修复 Octave urlread导致对等证书无法使用给定的CA证书进行身份验证

转载 作者:行者123 更新时间:2023-12-01 19:37:01 25 4
gpt4 key购买 nike



如何修复八度(假定与八度捆绑在一起的libcurl)的octave(无法解决),导致对等证书无法使用给定的CA证书进行身份验证?

阅读pkg install from forge in windows后,Octave维护者似乎知道Octave 4.0的问题,但似乎没有可用的修复程序。

问题

看起来Windows上的Octave的urlread无法用于HTTPS,因为https://octave.sourceforge.io之类的服务器证书无法使用urlread(似乎称为curl)所指的受信任证书进行身份验证。

例如,当尝试运行pkg install -forge来安装软件包时,share \ octave \ 4.2.0 \ m \ pkg \ private \ get_forge_pkg.m第64行引起了该问题。

## Try get the list of all packages.
[html, succ] = urlread ("http://packages.octave.org/list_packages.php");
if (! succ)
error ("get_forge_pkg: could not read URL, please verify internet connection");
endif


从命令窗口运行urlread会显示以下错误。

>> [html, status, msg] = urlread ("http://packages.octave.org/list_packages.php");
>> msg
msg = Peer certificate cannot be authenticated with given CA certificates


尝试通过HTTPS和google.com进行搜索。

>> [html, status, msg] = urlread ("https://google.com");
>> msg
msg = Peer certificate cannot be authenticated with given CA certificates


IE和Google Chrome根证书可以验证sourceforge证书。

enter image description here

enter image description here

尝试如下系统。

#[html, succ] = urlread ("http://packages.octave.org/list_packages.php");
sURLLink="https://octave.sourceforge.io/list_packages.php"
command=['curl --insecure ','"',sURLLink,'"'];
[succ, html] = system(command)
#if (! succ)
if (succ != 0)
error ("get_forge_pkg: could not read URL, please verify internet connection");
endif


但是,它导致了另一个错误。

>> pkg install -forge symbolic
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 559 100 559 0 0 389 0 0:00:01 0:00:01 --:--:-- 393
sURLLink = https://octave.sourceforge.io/list_packages.php
succ = 0
html = bim
bsltl
cgi
....

error: get_forge_pkg: package NAME exists, but index page not available
error: called from
get_forge_pkg at line 74 column 7
get_forge_download at line 26 column 12
pkg at line 382 column 29


相关信息


pkg install from forge in windows
urlread(), urlwrite() don't work for https pages in Octave for Windows
windows libcurl - peer certificate cannot be authenticated with given ca certificates
Getting error in Curl - Peer certificate cannot be authenticated with known CA certificates
SSL CA Certificates - LibCurl C Language (Linux)


环境


Windows 7 Enterprise 64位版本6.1.7601 Service Pack 1 Build 7601上的octave-4.2.0-w64
Windows 10 Pro 64位版本10.0.14393(版本14393)上的Octave 4.0.3

最佳答案

因为您的CA存储区不包含必需的CA证书,所以出现“无法验证对等证书”错误。您可以获得更新的捆绑软件from here
您尝试使用curl命令行工具不起作用的原因是,您没有使用-L, --location选项告诉curl遵循重定向,所以您只得到了http://packages.octave.org/list_packages.php返回的303响应。如果使用-L,您会看到它将两次将您重定向到HTTPS:// URL-只是无论如何都被迫解决问题(1)。

关于https - 修复 Octave urlread导致对等证书无法使用给定的CA证书进行身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41687341/

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