Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using Rcurl with HTTPs

Tags:

r

rcurl

I tried the following code in R on windows:

library(RCurl)
postForm("https://www.google.com/accounts/ClientLogin/",
    "email" = "[email protected]",
    "Passwd" = "abcd",
    "service" = "finance",
    "source" = "Test-1"
)

but go the following error:

Error in postForm()
SL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

How do I setup RCurl to allow use of HTTPs?

like image 887
Zach Avatar asked Jul 18 '11 17:07

Zach


1 Answers

just add .opts = list(ssl.verifypeer = FALSE) to your query

postForm("https://www.google.com/accounts/ClientLogin/",
    "email" = "[email protected]",
    "Passwd" = "abcd",
    "service" = "finance",
    "source" = "Test-1",
    .opts = list(ssl.verifypeer = FALSE))
like image 100
Pak Avatar answered Sep 17 '22 03:09

Pak