diff --git a/src/config/config.js b/src/config/config.js index dc53a12f..135a02ec 100644 --- a/src/config/config.js +++ b/src/config/config.js @@ -228,7 +228,6 @@ export default { * Parsing of packets is normally restricted to a predefined set of packets. For example a Sym. Encrypted Integrity Protected Data Packet can only * contain a certain set of packets including LiteralDataPacket. With this setting we can allow additional packets, which is probably not advisable * as a global config setting, but can be used for specific function calls (e.g. decrypt method of Message). - * NB: `config.enforceGrammar` may need to be disabled as well. * @memberof module:config * @property {Array} additionalAllowedPackets Allow additional packets on parsing. Defined as array of packet classes, e.g. [PublicKeyPacket] */ diff --git a/src/packet/grammar.ts b/src/packet/grammar.ts index 6e0e7038..77e4dcf0 100644 --- a/src/packet/grammar.ts +++ b/src/packet/grammar.ts @@ -58,8 +58,6 @@ export class MessageGrammarValidator { throw new GrammarError('Non-encrypted data packet following ESK packet'); } this.sawDataPacket = true; - } else { - throw new GrammarError(`Unexpected packet: ${packet}`); } }