From 64823d63d00815d6c795fffc8d8b1fdbd3808ed3 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Thu, 29 Apr 2021 15:16:41 -0700 Subject: [PATCH] feat: remove secio support Secio has now been completely deprecated and support has been removed from the go-libp2p daemon (in master). --- pdd/PDD-THE-IPFS-BUNDLE.md | 2 +- src/daemon.js | 2 -- src/utils.js | 1 - test/connect/ed25519/index.js | 8 ++------ test/connect/rsa/index.js | 8 ++------ test/connect/secp256k1/index.js | 8 ++------ 6 files changed, 7 insertions(+), 22 deletions(-) diff --git a/pdd/PDD-THE-IPFS-BUNDLE.md b/pdd/PDD-THE-IPFS-BUNDLE.md index 320477b..4c93729 100644 --- a/pdd/PDD-THE-IPFS-BUNDLE.md +++ b/pdd/PDD-THE-IPFS-BUNDLE.md @@ -21,7 +21,7 @@ class Node extends libp2p { Yamux ], crypto: [ - SECIO + Noise // TLS 1.3 (Soon™) ] }, diff --git a/src/daemon.js b/src/daemon.js index 6e1dc94..1663380 100644 --- a/src/daemon.js +++ b/src/daemon.js @@ -114,7 +114,6 @@ class Daemon { // we need to be in dht server mode for testing execOptions = ['-listen', addr, '-hostAddrs=/ip4/0.0.0.0/tcp/0,/ip4/0.0.0.0/udp/0/quic'] - execOptions.push(`-secio=${options.secio}`) execOptions.push(`-noise=${options.noise}`) options.dht && execOptions.push('-dhtServer') options.pubsub && execOptions.push('-pubsub') @@ -122,7 +121,6 @@ class Daemon { } else { execOptions = ['--listen', addr, '-hostAddrs=/ip4/0.0.0.0/tcp/0'] - execOptions.push(`--secio=${options.secio}`) execOptions.push(`--noise=${options.noise}`) options.dht && execOptions.push('--dht') options.pubsub && execOptions.push('--pubsub') diff --git a/src/utils.js b/src/utils.js index cbb48fe..53ba5d7 100644 --- a/src/utils.js +++ b/src/utils.js @@ -16,7 +16,6 @@ exports.getMultiaddr = (sockPath, port) => isWindows : ma(`/unix${path.resolve(os.tmpdir(), sockPath)}`) exports.DEFAULT_CONFIG = { - secio: false, noise: true, dht: false } diff --git a/test/connect/ed25519/index.js b/test/connect/ed25519/index.js index e4507c1..5ff7a30 100644 --- a/test/connect/ed25519/index.js +++ b/test/connect/ed25519/index.js @@ -1,9 +1,5 @@ 'use strict' -// SECIO -require('./go2js')('secio', { secio: true, noise: false }) -require('./js2go')('secio', { secio: true, noise: false }) - // NOISE -require('./go2js')('noise', { secio: false, noise: true }) -require('./js2go')('noise', { secio: false, noise: true }) +require('./go2js')('noise', { noise: true }) +require('./js2go')('noise', { noise: true }) diff --git a/test/connect/rsa/index.js b/test/connect/rsa/index.js index e4507c1..5ff7a30 100644 --- a/test/connect/rsa/index.js +++ b/test/connect/rsa/index.js @@ -1,9 +1,5 @@ 'use strict' -// SECIO -require('./go2js')('secio', { secio: true, noise: false }) -require('./js2go')('secio', { secio: true, noise: false }) - // NOISE -require('./go2js')('noise', { secio: false, noise: true }) -require('./js2go')('noise', { secio: false, noise: true }) +require('./go2js')('noise', { noise: true }) +require('./js2go')('noise', { noise: true }) diff --git a/test/connect/secp256k1/index.js b/test/connect/secp256k1/index.js index e4507c1..5ff7a30 100644 --- a/test/connect/secp256k1/index.js +++ b/test/connect/secp256k1/index.js @@ -1,9 +1,5 @@ 'use strict' -// SECIO -require('./go2js')('secio', { secio: true, noise: false }) -require('./js2go')('secio', { secio: true, noise: false }) - // NOISE -require('./go2js')('noise', { secio: false, noise: true }) -require('./js2go')('noise', { secio: false, noise: true }) +require('./go2js')('noise', { noise: true }) +require('./js2go')('noise', { noise: true })