R: Specify SSL version in Rcurl getURL statement

2019-07-12 10:43发布

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

标签: r curl ssl rcurl
1条回答
来,给爷笑一个
2楼-- · 2019-07-12 11:17

For me this works:

a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary", ssl.verifypeer=TRUE, sslversion=4L) 
查看更多
登录 后发表回答