Skip to content

Commit 43e4644

Browse files
authored
Merge pull request #7943 from ipfs/feat/remove-secio
feat: remove secio support
2 parents 6527675 + ccc2d23 commit 43e4644

13 files changed

+14
-364
lines changed

cmd/seccat/.gitignore

-1
This file was deleted.

cmd/seccat/seccat.go

-255
This file was deleted.

cmd/seccat/seccat_plan9.go

-8
This file was deleted.

cmd/seccat/seccat_posix.go

-10
This file was deleted.

cmd/seccat/util.go

-47
This file was deleted.

core/node/libp2p/sec.go

+9-5
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,14 @@ import (
44
config "github.com/ipfs/go-ipfs-config"
55
"github.com/libp2p/go-libp2p"
66
noise "github.com/libp2p/go-libp2p-noise"
7-
secio "github.com/libp2p/go-libp2p-secio"
87
tls "github.com/libp2p/go-libp2p-tls"
98
)
109

10+
const secioEnabledWarning = `The SECIO security transport was enabled in the config but is no longer supported.
11+
12+
SECIO disabled by default in go-ipfs 0.7 removed in go-ipfs 0.9. Please remove
13+
Swarm.Transports.Security.SECIO from your IPFS config.`
14+
1115
func Security(enabled bool, tptConfig config.Transports) interface{} {
1216
if !enabled {
1317
return func() (opts Libp2pOpts) {
@@ -18,16 +22,16 @@ func Security(enabled bool, tptConfig config.Transports) interface{} {
1822
}
1923
}
2024

25+
if _, enabled := tptConfig.Security.SECIO.WithDefault(config.Disabled); enabled {
26+
log.Error(secioEnabledWarning)
27+
}
28+
2129
// Using the new config options.
2230
return func() (opts Libp2pOpts) {
2331
opts.Opts = append(opts.Opts, prioritizeOptions([]priorityOption{{
2432
priority: tptConfig.Security.TLS,
2533
defaultPriority: 100,
2634
opt: libp2p.Security(tls.ID, tls.New),
27-
}, {
28-
priority: tptConfig.Security.SECIO,
29-
defaultPriority: config.Disabled,
30-
opt: libp2p.Security(secio.ID, secio.New),
3135
}, {
3236
priority: tptConfig.Security.Noise,
3337
defaultPriority: 300,

docs/config.md

+2-10
Original file line numberDiff line numberDiff line change
@@ -1352,8 +1352,7 @@ receiver supports. When establishing an _inbound_ connection, go-ipfs will let
13521352
the initiator choose the protocol, but will refuse to use any of the disabled
13531353
transports.
13541354

1355-
Supported transports are: TLS (priority 100), SECIO (Disabled: i.e. priority false), Noise
1356-
(priority 300).
1355+
Supported transports are: TLS (priority 100) and Noise (priority 300).
13571356

13581357
No default priority will ever be less than 100.
13591358

@@ -1369,14 +1368,7 @@ Type: `priority`
13691368

13701369
#### `Swarm.Transports.Security.SECIO`
13711370

1372-
[SECIO](https://github.com/libp2p/specs/tree/master/secio) was the most widely
1373-
supported IPFS & libp2p security transport. However, it is currently being
1374-
phased out in favor of more popular and better vetted protocols like TLS and
1375-
Noise.
1376-
1377-
Default: `false`
1378-
1379-
Type: `priority`
1371+
Support for SECIO has been removed. Please remove this option from your config.
13801372

13811373
#### `Swarm.Transports.Security.Noise`
13821374

0 commit comments

Comments
 (0)