mirror of
https://github.com/openpgpjs/openpgpjs.git
synced 2025-06-06 22:26:46 +00:00

It enforces a message structure as defined in https://www.rfc-editor.org/rfc/rfc9580.html#section-10.3 (but slightly more permissive with Padding packets allowed in all cases). Since we are unclear on whether this change might impact handling of some messages in the wild, generated by odd use-cases or non-conformant implementations, we also add the option to disable the grammar check via `config.enforceGrammar`. GrammarErrors are only sensitive in the context of unauthenticated decrypted streams.