Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
Merge pull request #76 from marten-seemann/deprecate
Browse files Browse the repository at this point in the history
add deprecation notices to Transport, the constructor and the README
  • Loading branch information
marten-seemann committed Feb 24, 2021
2 parents 702833a + d2369dc commit 0d1ffa7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 4 additions & 1 deletion transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0d1ffa7

Please sign in to comment.