cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: cacert.pem updates in real time

From: Tim Rühsen <tim.ruehsen_at_gmx.de>
Date: Sat, 02 Jul 2016 13:33:23 +0200

On Saturday 02 July 2016 08:37:18 Vinayak Tanksale wrote:
> How do we know that we need to download a new one? We have an app that uses
> cacert.pem and if a new one is issued then the app stops functioning. We
> would ideally want as much less downtime as possible. We are downloading
> the file once a day via a script but if there was a way to know when a new
> cacert had been posted then we can download it right away without waiting
> for our script to run. Thank you very much.

(Bash me for suggesting to use wget ;-))

$ wget -N http-url

only downloads the file if the timestamp changed.
So there is not much data traffic in the case when the server hasn't a new
one.

I would run this every X minutes and compare the file date before and after
'wget ...'. If it changed, you know there has been new data arrived.

But maybe there is a similar curl option that I am not aware off.

*duck away*

Tim

-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html

Received on 2016-07-02