Skip to content

Commit

Permalink
ASCII armoring should not require the CRC line
Browse files Browse the repository at this point in the history
  • Loading branch information
dkg committed May 3, 2023
1 parent 30a7571 commit 77aaca7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgpy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class Armorable(metaclass=abc.ABCMeta):
# capture all lines of the body, up to 76 characters long,
# including the newline, and the pad character(s)
(?P<body>([A-Za-z0-9+/]{1,76}={,2}(?:\r?\n))+)
# capture the armored CRC24 value
^=(?P<crc>[A-Za-z0-9+/]{4})(?:\r?\n)
# optionally capture the armored CRC24 value
(?:^=(?P<crc>[A-Za-z0-9+/]{4})(?:\r?\n))?
# finally, capture the armor tail line, which must match the armor header line
^-{5}END\ PGP\ (?P=magic)-{5}(?:\r?\n)?
""", flags=re.MULTILINE | re.VERBOSE)
Expand Down

0 comments on commit 77aaca7

Please sign in to comment.