8 Commits

Author SHA1 Message Date
larabr
88cd1810a3 Implement OpenPGP message grammar validation (add config.enforceGrammar)
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.
2025-05-20 14:17:13 +02:00
larabr
6a306a1797 Lint: add support for dep imports that use exports declarations 2024-05-17 13:00:37 +02:00
larabr
2985b0f470 Lint: add support for TS files, fix errors 2024-05-16 13:59:11 +02:00
larabr
ec52bdea83 Point to official noble-hashes and noble-curve libs 2024-05-16 13:59:11 +02:00
larabr
19cb6ee521 Lint: make 'space-before-function-paren' rule stricter to reflect enforced style 2023-12-18 15:52:19 +01:00
larabr
30635c72e8 Lint: error on unnecessary switch-case braces
Also fix some indent issues with armoring code detected after required ESLint update.

s
2023-10-25 12:53:15 +02:00
larabr
6ef4392fb1 Lint: update config to support ESM imports 2023-10-25 12:53:11 +02:00
larabr
21a6d83ec8 Update asmcrypto.js, use for AES only (move to noble-hashes for sha1, sha256) 2023-10-25 12:53:10 +02:00