Created
July 17, 2015 17:07
-
-
Save rpunt/85ab824375936a2caebf to your computer and use it in GitHub Desktop.
Mirror a CRL, and use the "This update" field as the file's mod-time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl http://site.com/file.crl -o /var/www/file.crl | |
lastmod=`openssl crl -inform DER -text -noout -in /var/www/file.crl | grep "Last Update" | awk '{ print "date -d \""$3FS$4FS$5FS$6"\" +%Y%m%d%H%M" }' | bash` | |
touch -mt $lastmod /var/www/file.crl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Assuming your CRLs regenerate on a fixed schedule, you can then set expires header for this MIME type to the appropriate interval. Nginx, for example:
expires modified +2d23h59m;