From d2369dc6c016e2afda55b32b787e0bc81ce82912 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Tue, 23 Feb 2021 19:48:59 +0800 Subject: [PATCH] add deprecation notices to Transport, the constructor and the README --- README.md | 7 +++++++ transport.go | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f3efbc8..85d309a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +# DEPRECATION NOTICE + +secio is not maintained any more, and we advise against using it. + +Use [go-libp2p-tls](https://github.com/libp2p/go-libp2p-tls/) and [go-libp2p-noise](https://github.com/libp2p/go-libp2p-noise/) instead. + + # go-libp2p-secio [![](https://img.shields.io/badge/made%20by-Protocol%20Labs-blue.svg?style=flat-square)](https://protocol.ai) diff --git a/transport.go b/transport.go index edd6f8e..51e0cd9 100644 --- a/transport.go +++ b/transport.go @@ -14,12 +14,15 @@ import ( // ID is secio's protocol ID (used when negotiating with multistream) const ID = "/secio/1.0.0" -// SessionGenerator constructs secure communication sessions for a peer. +// Deprecated: secio is now deprecated. +// Use TLS 1.3 (https://github.com/libp2p/go-libp2p-tls/) and Noise (https://github.com/libp2p/go-libp2p-noise/) instead. type Transport struct { LocalID peer.ID PrivateKey ci.PrivKey } +// Deprecated: secio is now deprecated. +// Use TLS 1.3 (https://github.com/libp2p/go-libp2p-tls/) and Noise (https://github.com/libp2p/go-libp2p-noise/) instead. func New(sk ci.PrivKey) (*Transport, error) { id, err := peer.IDFromPrivateKey(sk) if err != nil {