r-hub / rhub

R-hub API client
https://r-hub.github.io/rhub/
Other
353 stars 51 forks source link

SSL certificate problem on MacOS #500

Closed AngusMcLure closed 2 years ago

AngusMcLure commented 2 years ago

I see on Twitter that there were some SSL issues on mac that were resolved in October, however I am still having SSL problems. Whenever I try to work with rhub (e.g. either directly using rhub::check_for_cran via devtools::chech_rhub) I get this error:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  SSL certificate problem: certificate has expired

I am also getting the same error with other web-based functions like rhub::validate_email

I have tried reinstalling rhub and its dependancies, but no luck.

macOS version: 10.14.6 (18G103) R version: 4.1.2 R Studio version: 1.4.1717

gaborcsardi commented 2 years ago

This is a bug in macOS, so updating the R packages will have no effect.

This is a bug in the libressl that comes with mojave and apple did not fix it. You can fix it manually. You need to edit /etc/ssl/cert.pem (make a backup copy first), and remove the cert that expired on Sep 30 14:01:15 2021 GMT. Its entry starts with

## Digital Signature Trust Co.

until the end of the cert, the first

-----END CERTIFICATE-----

line. You can test it with something like

curl -v https://builder.r-hub.io >/dev/null

from a shell. This should fail before, and not fail after your edit.

Depending on which browser you use, you might need to update that as well, at least I had to update chrome.

Or you can update to Catalina or Big Sur.

AngusMcLure commented 2 years ago

Great, thank you Gábor. Editing /etc/ssl/cert.pem has fixed the issue!

shntnu commented 1 year ago

@gaborcsardi I believe the certificate might have actually expired for real just now.

gaborcsardi commented 1 year ago

Sorry about that, should be fixed.