When verifying a signature we need to strip the value of the b= tag.
Today, we do this with a regexp that can accidentally match other tag
values. For example, "z=Subject:club=20".
This can cause valid emails to fail verification. But it can't cause an
invalid email to pass verification, so it's not a significant security
concern.
To fix this, this patch updates the regular expression to match the tag
more precisely. It also adds a few tests to validate the behaviour is
correct, which were cross-checked with other implementations.
Thanks to John JEAN <john@wargan.com> for reporting this bug.
The current .gitignore pattern doesn't work when the private test cases
are a symlink, which can be convenient.
This patch fixes it by changing the pattern to match symlinks as well as
directories.