Https 修复了Octave urlread导致对等证书无法使用给定CA证书进行身份验证的问题 问题:

Https 修复了Octave urlread导致对等证书无法使用给定CA证书进行身份验证的问题 问题:,https,ssl-certificate,octave,libcurl,urlread,Https,Ssl Certificate,Octave,Libcurl,Urlread,如何修复Octave(假设libcurl与Octave捆绑在一起)导致对等证书无法使用给定CA证书进行身份验证的urlread问题(不是解决方法) 阅读后,Octave维护人员似乎意识到Octave 4.0的问题,但似乎没有可用的修复程序 问题 Windows上Octave的urlread似乎不适用于HTTPS,因为诸如的服务器证书无法使用urlread(似乎称为curl)引用的受信任证书进行身份验证 例如,在尝试运行pkg install-forge安装包时,share\octave\4.2.

如何修复Octave(假设libcurl与Octave捆绑在一起)导致对等证书无法使用给定CA证书进行身份验证的urlread问题(不是解决方法)

阅读后,Octave维护人员似乎意识到Octave 4.0的问题,但似乎没有可用的修复程序

问题 Windows上Octave的urlread似乎不适用于HTTPS,因为诸如的服务器证书无法使用urlread(似乎称为curl)引用的受信任证书进行身份验证

例如,在尝试运行pkg install-forge安装包时,share\octave\4.2.0\m\pkg\private\get\u forge\u 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证书

尝试如下系统

#[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
相关信息
环境
  • 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上的倍频程4.0.3
  • 由于您的CA存储区不包含必要的CA证书,因此出现“无法验证对等证书”错误。您可以获得更新的捆绑包
  • 您尝试使用curl命令行工具不起作用的原因是您没有使用option来告诉curl遵循重定向,所以您只得到了303响应
    http://packages.octave.org/list_packages.php
    返回。如果您使用-L,您将看到它将两次将您重定向到HTTPS://URL,但最终您将被迫修复案例(1)

  • 谢谢你的回复。您能否提供更详细的信息,说明如何以及在何处更新CURL或Octave库使用的“CA存储”?IE、Chrome或JRE都有自己的存储库,所以我想Octave使用的库也有自己的。因为我对Octave不熟悉,所以在这一点上我不得不含糊其辞。我非常了解libcurl,既然使用了libcurl,我可以谈谈这些细节。libcurl通常将“CA包”作为文件加载(PEM格式)。我想Octave文档应该澄清CA包在哪里/如何提供/更新。谢谢Daniel,它给出了寻找的方向。仅供参考:Nick在中提供了原因、修复版本和解决方法。