I am facing a challenge when trying to use the HTTR
package in R and the GET()
function:
pg2 = GET("http://httpbin.org/basic-auth/user/passwd", authenticate("user","passwd"))
and i am getting the below error:
Error in function (type, msg, asError = TRUE) :
SSL certificate problem, verify that the CA cert is OK. Details:
error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
I have searched on the web and found that I need to update the .Rprofile file using the below command line:
options(RCurlOptions = list(verbose = FALSE, capath = system.file("CurlSSL", "cacert.pem", package = "RCurl"), ssl.verifypeer = FALSE))
but still it doesn't work and I keep getting the same error message.
also when i tried the below code
> HEAD("https://www.google.com", verbose())
- About to connect() to www.google.com port 443 (#0)
- Trying 173.194.32.211... * connected
- Connected to www.google.com (173.194.32.211) port 443 (#0)
- successfully set certificate verify locations:
- CAfile: C:/Users/malek.safa/Documents/R/win-library/3.0/httr/cacert.pem CApath: none
- SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
- Closing connection #0 Error in function (type, msg, asError = TRUE) : SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
you can see that it is still looking for the CA in the cacert.pm file