2

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")
Steph Locke
  • 5,951
  • 4
  • 39
  • 77
  • Apologies to Duncan Temple Lang, but the RCurl documentation is a mess. You basically need to map the appropriate libcurl option ([see documentation here](http://curl.haxx.se/libcurl/c/curl_easy_setopt.html)) to the relevant RCurl argument (see `listCurlOptions()` for all of the possible options). You probably want the `sslversion` argument. It's probably used as `sslversion="CURL_SSLVERSION_SSLv3"`, but you might have to play around with it a little bit. – Thomas Jan 20 '14 at 15:26
  • Thanks for the help - the line `sslversion="SSLVERSION_SSLv3"` when added is syntactically correct but doesn't seem to me helping. Will keep plugging away but in the interim if you'd like to put it as an answer I can mark it as accepted – Steph Locke Jan 20 '14 at 15:39
  • Well, if it doesn't solve the problem, then it's not a very good answer. :) Are you continuing to get the same error or is it something new? – Thomas Jan 20 '14 at 15:49
  • Same error but I'm not sure if it's the same thing as the curl command get this message `< X-MSDAVEXT_Error: 917656; Access denied. Before opening files in this location, you must first browse to the web site and select the option to login automatically.` – Steph Locke Jan 20 '14 at 15:56
  • That sounds like a server issue, not an **RCurl** issue. – Thomas Jan 29 '14 at 14:25
  • If `curl https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary -v -SSLv3` works, then it sounds like an *RCurl* issue, not a server issue. – geneorama Aug 25 '14 at 21:10
  • related question (to do not use SSLv3) asked on github repo: https://github.com/omegahat/RCurl/issues/16 – jangorecki Oct 15 '14 at 10:30

1 Answers1

0

For me this works:

a<-getURL("https://example.sharepoint.com/_vti_bin/listdata.svc/Glossary", ssl.verifypeer=TRUE, sslversion=4L) 
Tom Wenseleers
  • 7,535
  • 7
  • 63
  • 103