libp2p-secio
Advanced tools
Comparing version 0.12.5 to 0.12.6
@@ -0,1 +1,11 @@ | ||
<a name="0.12.6"></a> | ||
## [0.12.6](https://github.com/ipfs/js-libp2p-secio/compare/v0.12.5...v0.12.6) (2020-07-08) | ||
### Bug Fixes | ||
* comply with message framing spec ([#123](https://github.com/ipfs/js-libp2p-secio/issues/123)) ([34c4844](https://github.com/ipfs/js-libp2p-secio/commit/34c4844)) | ||
<a name="0.12.5"></a> | ||
@@ -2,0 +12,0 @@ ## [0.12.5](https://github.com/ipfs/js-libp2p-secio/compare/v0.12.4...v0.12.5) (2020-05-07) |
@@ -15,2 +15,4 @@ /*! | ||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
/** | ||
@@ -17,0 +19,0 @@ * [js-sha3]{@link https://github.com/emn178/js-sha3} |
{ | ||
"name": "libp2p-secio", | ||
"version": "0.12.5", | ||
"version": "0.12.6", | ||
"description": "Secio implementation in JavaScript", | ||
@@ -46,3 +46,3 @@ "leadMaintainer": "Friedel Ziegelmayer <dignifiedquire@gmail.com>", | ||
"devDependencies": { | ||
"aegir": "^21.4.2", | ||
"aegir": "^22.0.0", | ||
"benchmark": "^2.1.4", | ||
@@ -49,0 +49,0 @@ "chai": "^4.2.0", |
@@ -13,2 +13,6 @@ 'use strict' | ||
// Maximum length of the data section of the message | ||
// 8MB, https://github.com/libp2p/specs/blob/94ad1bd/secio/README.md#message-framing | ||
const MAX_DATA_LENGTH = 0x800000 | ||
const etm = require('../etm') | ||
@@ -32,6 +36,8 @@ const crypto = require('./crypto') | ||
network, // and gets piped INTO and FROM the network | ||
lp.decode({ lengthDecoder: int32BEDecode }), | ||
lp.decode({ lengthDecoder: int32BEDecode, maxDataLength: MAX_DATA_LENGTH }), | ||
etm.createUnboxStream(proto.remote.cipher, proto.remote.mac), | ||
secure // and gets piped TO the user | ||
) | ||
).catch(err => { | ||
log.error('an error occurred in the crypto stream', err) | ||
}) | ||
@@ -38,0 +44,0 @@ // Exchange nonces over the encrypted stream for final verification |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
503454
16
406
1