2

I was running the code for months without any issues, and couple days before.

GET(url="myurl", query)

Today I've got an error

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

The SSL cert on the site is active and ends in a year.

Also the same GET request is working via browser....

What is the issue? ‍♂️

Sasha Poda
  • 105
  • 1
  • 7
  • The issue (with as much as we "know") is that the certificate has expired. Have you checked all intermediate certs? How (and from where) are you verifying that the certificate is *"active and ends in a year"*? Have you updated `curl` or any dependent package recently in R? – r2evans Jun 01 '20 at 20:05

1 Answers1

4

Try testing your server with this tool: https://www.ionos.com/tools/ssl-checker and see if it says that it is "not installed correctly".

If you find that it has been working historically but recently stopped, you likely have an invalid chain of trust. Recently, a common root CA certificate expired. Your server may be using this and sending it as part of it's chain of certificates it sends to clients. If that is the case, and it is this recently-expired root CA, your fix will most likely look like removing that root certificate from your bundle. So you'd include the intermediate certificates still, but exclude the root. You can then use these tools to revalidate if things are setup correctly.

You can also see the chain and some of the validity information using this tool: https://www.sslshopper.com/ssl-checker.html

Chase
  • 3,028
  • 14
  • 15
  • It is the most client side issue for unix systems mac - https://security.stackexchange.com/questions/232445/https-connection-to-specific-sites-fail-with-curl-on-macos ubuntu - https://stackoverflow.com/questions/62107431/curl-error-60-ssl-certificate-problem-certificate-has-expired – Sasha Poda Jun 02 '20 at 10:10