R:在Rcurl getURL语句中指定SSL版本 [英] R: Specify SSL version in Rcurl getURL statement

查看:278
本文介绍了R:在Rcurl getURL语句中指定SSL版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目标
我正在尝试编写一条语句以连接到共享点在线列表以检索要在R中使用的数据。



背景
这是我第一次使用RCurl / curl / libcurl,我试图阅读该文档,但超出了我的范围,没有任何相关示例。 p>

使用

  a< -getURL( https:// example。 sharepoint.com/_vti_bin/listdata.svc/词汇表)

导致错误

 函数错误(类型,msg,asError = TRUE):
与example.sharepoint.com连接时发生未知的SSL协议错误: 443

结合Google和解密的libcurl文档后发现,问题出在SSL类型。我在shell中使用curl进行了验证,结果得到了SharePoint Server的肯定答复(好吧,除了需要添加用户名和密码)

  curl https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary -v -SSLv3 

问题
我无法计算出如何在RTFM之后在getURL()函数中包含-SSLv3参数



请求的解决方案
修改此语句以使用SSLv3

  a< -getURL( https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary)


解决方案

对我来说这可行:

  a< -getURL( https:/ /example.sharepoint.com/_vti_bin/listdata.svc/Glossary\",ssl.verifypeer=TRUE,sslversion=4L)


Aim I am trying to write a statement to connect to a sharepoint online list to retrieve the data for use in R.

Background This is my first time using RCurl/curl/libcurl and I've attempted to read the documentation but it's beyond me and doesn't have any relevant examples.

Using

a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary")

Resulted in an error

Error in function (type, msg, asError = TRUE)  : 
  Unknown SSL protocol error in connection to example.sharepoint.com:443 

A combination of google and deciphering of cryptic libcurl documentation identified that the issue was due to the SSL type. I used curl in shell to verify and I got a positive response from the sharepoint server as a result (well, except the need to add the user name and password)

curl https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary -v -SSLv3

Problem I cannot work out how to include the -SSLv3 argument in my getURL() function after RTFMs

Requested solution Amend this statement to utilise SSLv3

a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary")

解决方案

For me this works:

a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary", ssl.verifypeer=TRUE, sslversion=4L) 

这篇关于R:在Rcurl getURL语句中指定SSL版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆