From 8ac134be5e57680eb1c6ef596e5de085825e83ee Mon Sep 17 00:00:00 2001 From: Ava Chow Date: Fri, 9 Jan 2026 16:06:19 -0800 Subject: [PATCH] contrib: verify-commits sha1 exceptions Allow some commits to not require the sha1 check. --- contrib/verify-commits/allow-sha1-commits | 1 + contrib/verify-commits/verify-commits.py | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 contrib/verify-commits/allow-sha1-commits diff --git a/contrib/verify-commits/allow-sha1-commits b/contrib/verify-commits/allow-sha1-commits new file mode 100644 index 00000000000..95650029eb7 --- /dev/null +++ b/contrib/verify-commits/allow-sha1-commits @@ -0,0 +1 @@ +aeaa67a9eac0decb89c60a67f9755ca10cbcc1d9 diff --git a/contrib/verify-commits/verify-commits.py b/contrib/verify-commits/verify-commits.py index 1af6b0314e1..a0eaf8cdbc5 100755 --- a/contrib/verify-commits/verify-commits.py +++ b/contrib/verify-commits/verify-commits.py @@ -94,6 +94,8 @@ def main(): incorrect_sha512_allowed = f.read().splitlines() with open(dirname + "/trusted-keys", "r") as f: trusted_keys = f.read().splitlines() + with open(dirname + "/allow-sha1-commits", "r") as f: + sha1_allowed = f.read().splitlines() # Set commit and variables current_commit = args.commit @@ -136,6 +138,8 @@ def main(): os.environ['BITCOIN_VERIFY_COMMITS_ALLOW_SHA1'] = "0" if no_sha1 else "1" + if current_commit in sha1_allowed: + os.environ['BITCOIN_VERIFY_COMMITS_ALLOW_SHA1'] = "1" allow_revsig = current_commit in revsig_allowed # Check that the commit (and parents) was signed with a trusted key