Created
July 28, 2022 07:22
-
-
Save skounis/341573d5ae0e269ab67ffb0ed45982f0 to your computer and use it in GitHub Desktop.
Download and verify the EU DCC Trustlist
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
#! /bin/bash | |
# Download trustlist, signature and certificate | |
wget https://ec.europa.eu/assets/eu-dcc/dcc_trustlist.zip | |
wget https://ec.europa.eu/assets/eu-dcc/dcc_trustlist.zip.sig.txt | |
wget https://ec.europa.eu/assets/eu-dcc/eu_signer.pem.txt | |
# Convert the signature file from base64 encoded to plain DER file | |
openssl base64 -a -A -d -in dcc_trustlist.zip.sig.txt -out dcc_trustlist.zip.sig.der | |
# Verify the integrity | |
openssl cms -verify -in dcc_trustlist.zip.sig.der -inform DER -content dcc_trustlist.zip -binary -CAfile eu_signer.pem.txt --out /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment