update SSL certificate file in shinyapps.io RCurl library

84 views
Skip to first unread message

Jan Górecki

unread,
May 13, 2014, 6:15:15 PM5/13/14
to shinyap...@googlegroups.com
Hi,

I got following message using RCurl on one of the source systems I'm trying to connect:

server certificate verification failed. CAfile: /usr/local/lib/R/site-library/RCurl/CurlSSL/cacert.pem CRLfile: none

Any way to upload updated certificate file to my library?
Other 3 sources are working well.

Regards,
Jan

Andy Kipp

unread,
May 16, 2014, 8:01:21 AM5/16/14
to Jan Górecki, shinyap...@googlegroups.com
Jan,

We actually ship a relatively recent version of the CA file with shinyapps package:

What is the platform / OS / R version you are seeing issues with?

-Andy


--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/9962a638-bc2d-4eca-8c50-000a1a85cb94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jan Górecki

unread,
May 16, 2014, 11:39:27 AM5/16/14
to shinyap...@googlegroups.com, Jan Górecki
Hello Andy,

Thank you for the answer and the link to your cacert.pem.
My package is using by default CA cert file taken from system.file("CurlSSL", "cacert.pem", package = "RCurl") and this particular CA cert was not up to date.
I was able to fix the issue by setting RCurlOptions cainfo = system.file("cert", "cacert.pem", package = "shinyapps").
Still is might be worth to consider to update RCurl CA file manually to prevent other dependencies (like my Rbitcoin package) from throwing errors.

Regards,
Jan

Jan Górecki

unread,
May 16, 2014, 11:44:01 AM5/16/14
to shinyap...@googlegroups.com, Jan Górecki
This fixed the issue locally, after deploy to shinyapps.io I cannot connect any external site with such cainfo path.
I get Problem with the SSL CA cert (path? access rights?)
Because of security reasons I might not have rights to set system.file manually? but the options inside the package are working well.

Any solution?
For now I'm going back to the previous RCurl CA file.

Regards

Andy Kipp

unread,
May 16, 2014, 12:30:43 PM5/16/14
to Jan Górecki, shinyap...@googlegroups.com
The problem with that approach is that the shinyapps package does not get installed on your application instances when you deploy your application because the shinyapps package itself is not a detected dependency of your code.

To workaround this you should put the CAfile in your application directory and reference it via its relative path e.g:

RCurlOptions cainfo = "cacert.pem"

Or you could incude the CAcert  file in Rbitcoin package, as we have done in shinyapps:

RCurlOptions cainfo = system.file("cert", "cacert.pem", package = "Rbitcoin")

However, the underlying issue is that the CACert shipping with RCurl is out of date. My other suggestion would be to reach out to the RCurl package maintainer and see if he will update it, and push a new version to CRAN.

-Andy


Reply all
Reply to author
Forward
0 new messages