| 1 | #!/bin/sh -e |
| 2 | # This data is documented at <https://www.iana.org/dnssec/files>. |
| 3 | |
| 4 | wget -O root-anchors.xml.NEW https://data.iana.org/root-anchors/root-anchors.xml |
| 5 | |
| 6 | if diff -u root-anchors.xml root-anchors.xml.NEW; then |
| 7 | echo "root-anchors.xml has NOT changed." |
| 8 | rm root-anchors.xml.NEW |
| 9 | exit |
| 10 | fi |
| 11 | |
| 12 | echo "root-anchors.xml has changed." |
| 13 | |
| 14 | wget -O root-anchors.p7s.NEW https://data.iana.org/root-anchors/root-anchors.p7s |
| 15 | |
| 16 | openssl smime -verify -CAfile icannbundle.pem -inform DER -in root-anchors.p7s.NEW -content root-anchors.xml.NEW -out /dev/null |
| 17 | |
| 18 | mv root-anchors.xml.NEW root-anchors.xml |
| 19 | mv root-anchors.p7s.NEW root-anchors.p7s |
| 20 |