R: Specify SSL version in Rcurl getURL statement

孤街浪徒 提交于 2019-12-11 03:44:00

问题


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")

回答1:


For me this works:

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


来源:https://stackoverflow.com/questions/21237469/r-specify-ssl-version-in-rcurl-geturl-statement

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!