How do I resolve this RCurl error: “SSL certificate problem: certificate has expired”?

£可爱£侵袭症+ 提交于 2020-07-09 08:57:28

问题


I'm just trying to get a simple URL response below and I get the following error. The website is valid and I've been able to pull from it thousands of times in the past.

jsonString <- getURL(full_url)

Error in function (type, msg, asError = TRUE)  : 
  SSL certificate problem: certificate has expired

Any ideas? I am running R 4.0.0 (I upgraded to see if that would fix the issue) and have the most up to date RCurl package.


回答1:


I have been facing the same problem from the past few weeks. So if you are using Rstudio and Rcurl package and getting the "Error in function (type, msg, asError = TRUE) : SSL certificate problem: certificate has expired" error, try the below code.

RCurl_raw <- RCurl::postForm(
    uri = redcap_uri
    , token = token
    , content = 'record'
    , format = 'csv'
    , type = 'flat'
    , rawOrLabel = 'raw'
    , exportDataAccessGroups = 'true'
    , .opts = RCurl::curlOptions(ssl.verifypeer=FALSE, verbose=TRUE)
)

ssl.verifypeer should be false.



来源:https://stackoverflow.com/questions/62246994/how-do-i-resolve-this-rcurl-error-ssl-certificate-problem-certificate-has-exp

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