libp2p-secio
Advanced tools
Comparing version 0.12.2 to 0.12.3
@@ -0,1 +1,11 @@ | ||
<a name="0.12.3"></a> | ||
## [0.12.3](https://github.com/ipfs/js-libp2p-secio/compare/v0.12.2...v0.12.3) (2020-02-13) | ||
### Bug Fixes | ||
* remove use of assert module ([#114](https://github.com/ipfs/js-libp2p-secio/issues/114)) ([027e0ad](https://github.com/ipfs/js-libp2p-secio/commit/027e0ad)) | ||
<a name="0.12.2"></a> | ||
@@ -2,0 +12,0 @@ ## [0.12.2](https://github.com/ipfs/js-libp2p-secio/compare/v0.12.1...v0.12.2) (2020-01-06) |
{ | ||
"name": "libp2p-secio", | ||
"version": "0.12.2", | ||
"version": "0.12.3", | ||
"description": "Secio implementation in JavaScript", | ||
@@ -66,2 +66,3 @@ "leadMaintainer": "Friedel Ziegelmayer <dignifiedquire@gmail.com>", | ||
"contributors": [ | ||
"Alex Potsides <alex@achingbrain.net>", | ||
"David Dias <daviddias.p@gmail.com>", | ||
@@ -68,0 +69,0 @@ "Dmitriy Ryajov <dryajov@gmail.com>", |
'use strict' | ||
const assert = require('assert') | ||
const debug = require('debug') | ||
@@ -14,4 +13,8 @@ const log = debug('libp2p:secio') | ||
async function secure (localPeer, duplex, remotePeer) { // returns duplex | ||
assert(localPeer, 'no local private key provided') | ||
assert(duplex, 'no connection for the handshake provided') | ||
if (!localPeer) { | ||
throw new Error('no local private key provided') | ||
} | ||
if (!duplex) { | ||
throw new Error('no connection for the handshake provided') | ||
} | ||
@@ -18,0 +21,0 @@ const state = new State(localPeer, remotePeer) |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6383170
46832