且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何解决此 RCurl 错误:“SSL 证书问题:证书已过期"?

更新时间:2022-06-11 02:57:05

过去几周我一直面临同样的问题.因此,如果您正在使用 Rstudio 和 Rcurl 包并收到函数错误(类型,味精,asError = TRUE):SSL 证书问题:证书已过期"错误,请尝试以下代码.

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 应该是假的.

ssl.verifypeer should be false.