Improve RFC4880 conformance
authorJacob Bachmeyer <jcb@gnu.org>
Tue, 18 Oct 2022 04:20:30 +0000 (23:20 -0500)
committerJacob Bachmeyer <jcb@gnu.org>
Tue, 18 Oct 2022 04:20:30 +0000 (23:20 -0500)
gatekeeper.pl

index 2e62057cbc6780205de6bcd6a52bb17d7973e04b..44e1c512dec7fa873c7727995b277359416f6745 100755 (executable)
@@ -812,7 +812,8 @@ sub read_directive {
   # First, we find the PGP signature header.
   while (<$directive>) {
     chomp; s/\r+$//;   # remove line ending, including DOS type
-    last if m/^-----BEGIN PGP SIGNED MESSAGE-----$/;
+    last if m/^-----BEGIN PGP SIGNED MESSAGE-----\s*$/;
+    # RFC4880 allows trailing whitespace on marker lines.
   }
   # We are now in the armor headers.
   while (<$directive>) {