证书中的主机名无效 - R.(The host name in the certificate is invalid - R)
在过去的四个月里,我从劳工部下载zip文件没有任何问题。 但是,昨晚,当我去下载数据时,收到以下错误消息:“证书中的主机名无效或不匹配”。 我今天早上尝试了几种不同的故障排除解决方案,包括更改我的默认broswer,但似乎没有任何效果。 我还在不同的WIFI站尝试了两台不同的计算机,但仍然收到相同的错误消息。 我很想知道其他人是否收到同样的错误消息。 任何有关如何解决这个问题的见解将不胜感激。
#DOWNLOAD_SCHEDULE_A
temp
download.file("http://askebsa.dol.gov/FOIA%20Files/2014/Latest/F_SCH_A_2014_Latest.zip",temp)
sch_a
unlink(temp)
For the past four months, I had no problems downloading the zip files from the Department of Labor. Last night, however, when I went to download the data, I received the following error message: 'The host name in the certificate is invalid or does not match'. I tried several different trouble shooting solutions this morning, including changing my default broswer, but nothing seems to work. I also tried two different computers at different WIFI stations and still receive the same error message. I'm curious to see if others receive the same error messsage. Any insight on how to solve this would be greatly appreciated.
#DOWNLOAD_SCHEDULE_A
temp
download.file("http://askebsa.dol.gov/FOIA%20Files/2014/Latest/F_SCH_A_2014_Latest.zip",temp)
sch_a
unlink(temp)
原文:https://stackoverflow.com/questions/41364672
更新时间:2020-10-19 18:10
最满意答案
它可能是他们最终的错误配置,或者可能是由于您的CA db文件略微过时。 你可以试试:
library(curl)
curl_download("https://askebsa.dol.gov/FOIA%20Files/2014/Latest/F_SCH_A_2014_Latest.zip",
temp, handle=new_handle(ssl_verifypeer=FALSE, ssl_verifyhost=FALSE))
但请注意,这是非常不安全的(即受到传输中数据完整性问题的影响)。
It cld be a misconfiguration on their end or possibly due to slightly outdated CA db files on your end. You can try:
library(curl)
curl_download("https://askebsa.dol.gov/FOIA%20Files/2014/Latest/F_SCH_A_2014_Latest.zip",
temp, handle=new_handle(ssl_verifypeer=FALSE, ssl_verifyhost=FALSE))
but note that it's woefully insecure (i.e. subject to in-transit data integrity issues).
相关问答
如果SSL / TLS证书的公用名称 (或SAN )与尝试访问您的服务时与另一个服务连接的主机名+域名不匹配,则会发生常见名称不匹配错误。 您的CommonName(CN = nginxsvc)应该匹配服务的主机和域名/ IP。 因此,如果您的服务位于nginxservice.yourdomain.com ,那么证书通用名称也应该是nginxservice.yourdomain.com 。 如果您仅将IP用于开发目的,那么您也可以使用该IP,直到您拥有服务的DNS条目。 A common name
...
尝试: filter.IgnorableServerCertificateErrors.Add(
ChainValidationResult.Untrusted |
ChainValidationResult.InvalidName);
有关更多证书选项,请参阅ChainValitadionResult枚举 Try: filter.IgnorableServerCertificateErrors.Add(
ChainValidationResult.Untrusted |
...
是dowloadFile还是downloadFile ? 那里有一个差异 Is it dowloadFile or downloadFile ? There's a discrepancy there
我应该将此视为gSoap中的错误并提交补丁 我认为这是一个错误。 它与Microsoft在IE等中的错误相同,即它们检查dNSName条目中的IP地址,而不是(与所有其他人一样)在IPAddress条目中。 Should I consider this a bug in gSoap and file a patch I would consider it a bug. And it is the same bug as Microsoft is having with IE etc in that
...
证书使用者名称'internal-server'与目标主机名'local.domain.net'不匹配 SSL证书绑定到特定域。 在通过OpenSSL创建证书期间,它应该要求您输入域名( local.domain.net )。 浏览器向您显示警告不仅是因为您使用了自签名证书,还因为它与域不匹配。 此警告可能有很多不同的原因。 certificate subject name 'internal-server' does not match target host name 'local.domai
...
在IIS Express中运行它。 右键单击您的Web项目并转到属性。 在Web选项卡上,请注意带有端口的项目URL( http:// localhost:12345 )这是它将在IIS Express中运行的URL。 然后启动您的站点以在IIS Express中启动它。 我右键单击Web并选择View,但您也可以开始调试。 在IIS Express中运行后,您可以按时钟查看任务栏中的图标,并管理IIS Express中运行的所有站点。 So without the available help.
...
作为其要求的一部分,SSL已验证证书CN与您要连接的主机名相匹配。 如果CN不匹配,那么浏览器将假定您连接到错误的主机和对象。 这是没有办法的。 SSL has, as part of it's requirements, validation that the certificate CN matches the hostname that you're connecting to. If the CN doesn't match, then the browser will assume th
...
使用URL中的真实主机名进行libcurl,以便主机名验证起作用。 如果要指向另一个主机,而不是通常要解析的名称,请使用CURLOPT_RESOLVE强制libcurl使用本地/临时IP。 请参阅resolve.c示例,了解如何完成此操作。 如果要在证书中添加多个名称,请使用SubjectAltName而不是CN。 Use the real host name in the URL to libcurl so that the host name verification works. If yo
...
它可能是他们最终的错误配置,或者可能是由于您的CA db文件略微过时。 你可以试试: library(curl)
curl_download("https://askebsa.dol.gov/FOIA%20Files/2014/Latest/F_SCH_A_2014_Latest.zip",
temp, handle=new_handle(ssl_verifypeer=FALSE, ssl_verifyhost=FALSE))
但请注意,这是非常不安全的(即受到传输中
...
@Marc B是正确的,你必须构建字符串以使用id_list_JSON包含的值。 在R中,您可以使用paste0来执行此操作 test3
fields = '{"_id" : 1, "f.fid" : 1, "ud" : 1}')
paste0行给出的位置 paste0('{"_id": {"$in": ', id_list_JSON, '}}
...