Skip to content

Singed message is not enforcing signature #56

@bwbroersma

Description

@bwbroersma

Singed message is not enforcing signature, e.g.:

-----BEGIN PGP SIGNED MESSAGE-----
Expires: 2024-01-01T00:00:00.000Z
Contact: https://www.example.org

This currently parses as valid with zero errors.

The issues for signed messages I can see:

  • hash-header not enforced (1*, so should be one or more)
  • no CRLF enforced (after hash-header)
  • armor-header (-----BEGIN PGP SIGNATURE-----) not enforced
  • no CRLF enforced (after either armor-keys or after the armor-header if no keys)
  • no data in signature enforces, no validation on valid base64
  • armor-tail (-----END PGP SIGNATURE-----) not explicitly enforced (only needed when armor-header is present, when armor-tail is missing, the error will be no_line_separators, because the last line is {'type': 'pgp_envelope'}, even when empty)
  • PGP Dash-Escaped Text is still parsed for pgp #54

The current code quite literally is this xkcd PGP 🙃:
PGP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions