-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·22 lines (16 loc) · 1.07 KB
/
update.sh
File metadata and controls
executable file
·22 lines (16 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
#Exit on Error
set -e
# Google
curl -sS https://www.gstatic.com/ct/log_list/v3/log_list.json -o google/log_list.json
curl -sS https://www.gstatic.com/ct/log_list/v3/log_list.sig -o google/log_list.sig
openssl dgst -sha256 -verify google/log_list_pubkey.pem -signature google/log_list.sig google/log_list.json && echo "Valid signature" || exit 1
curl -sS https://www.gstatic.com/ct/log_list/v3/all_logs_list.json -o google/all_logs_list.json
curl -sS https://www.gstatic.com/ct/log_list/v3/all_logs_list.sig -o google/all_logs_list.sig
openssl dgst -sha256 -verify google/log_list_pubkey.pem -signature google/all_logs_list.sig google/all_logs_list.json && echo "Valid signature" || exit 1
# Apple
curl -sS https://valid.apple.com/ct/log_list/current_log_list.json -o apple/current_log_list.json
# Mozilla
curl -sS https://hg-edge.mozilla.org/mozilla-central/raw-file/default/security/ct/CTKnownLogs.h -o mozilla/CTKnownLogs.h
# Check if anything relevant changed and ignore build times, version and timestamps
git diff -I'"version":' -I'"log_list_timestamp":' -I'kCTExpirationTime'