Rename config.unsafe_stream to allow_unauthenticated_stream

This commit is contained in:
Daniel Huigens
2018-06-28 19:22:53 +02:00
parent 2b30ab9c8f
commit e66d44e42d
3 changed files with 30 additions and 25 deletions

View File

@@ -148,7 +148,7 @@ SymEncryptedIntegrityProtected.prototype.decrypt = async function (sessionKeyAlg
});
let packetbytes = stream.slice(bytes, 0, -2);
packetbytes = stream.concat([packetbytes, stream.fromAsync(() => verifyHash)]);
if (!util.isStream(encrypted) || !config.unsafe_stream) {
if (!util.isStream(encrypted) || !config.allow_unauthenticated_stream) {
packetbytes = await stream.readToEnd(packetbytes);
}
await this.packets.read(packetbytes);