Commit d554b7bd authored by tavit ohanian's avatar tavit ohanian

initial port

parent 97104d02
Pipeline #698 passed with stages
in 31 seconds
stages:
- build
- test
variables:
BUILD_DIR: "/tmp/$CI_CONCURRENT_PROJECT_ID"
before_script:
- mkdir -p $BUILD_DIR/src
- cd $BUILD_DIR/src
- if [ -d $CI_PROJECT_DIR ]
- then
- echo "soft link $CI_PROJECT_DIR exists"
- else
- echo "creating soft link $CI_PROJECT_DIR"
- ln -s $CI_PROJECT_DIR
- fi
- cd $CI_PROJECT_DIR
build:
stage: build
tags:
- testing
script:
- echo $CI_JOB_STAGE
- go build
test:
stage: test
tags:
- testing
script:
- echo $CI_JOB_STAGE
- go test -cover
coverage: '/coverage: \d+.\d+% of statements/'
......@@ -11,8 +11,8 @@ import (
"crypto/sha512"
"hash"
ci "github.com/libp2p/go-libp2p-core/crypto"
sha256 "github.com/minio/sha256-simd"
ci "gitlab.dms3.io/p2p/go-p2p-core/crypto"
)
// SupportedExchanges is the list of supported ECDH curves
......
This diff is collapsed.
......@@ -9,15 +9,15 @@ import (
"net"
"time"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/sec"
"gitlab.dms3.io/p2p/go-p2p-core/peer"
"gitlab.dms3.io/p2p/go-p2p-core/sec"
proto "github.com/gogo/protobuf/proto"
logging "github.com/ipfs/go-log"
ci "github.com/libp2p/go-libp2p-core/crypto"
pb "github.com/libp2p/go-libp2p-secio/pb"
msgio "github.com/libp2p/go-msgio"
mh "github.com/multiformats/go-multihash"
logging "gitlab.dms3.io/dms3/public/go-log"
msgio "gitlab.dms3.io/p2p/go-msgio"
ci "gitlab.dms3.io/p2p/go-p2p-core/crypto"
pb "gitlab.dms3.io/p2p/go-p2p-secio/pb"
)
var log = logging.Logger("secio")
......@@ -114,7 +114,7 @@ func hashSha256(data []byte) mh.Multihash {
// keys, IDs, and initiate communication, assigning all necessary params.
// requires the duplex channel to be a msgio.ReadWriter (for framed messaging)
func (s *secureSession) runHandshake(ctx context.Context) error {
defer log.EventBegin(ctx, "secureHandshake", s).Done()
// defer log.EventBegin(ctx, "secureHandshake", s).Done()
result := make(chan error, 1)
go func() {
......
......@@ -9,8 +9,8 @@ import (
"io"
"sync"
pool "github.com/libp2p/go-buffer-pool"
msgio "github.com/libp2p/go-msgio"
pool "gitlab.dms3.io/p2p/go-buffer-pool"
msgio "gitlab.dms3.io/p2p/go-msgio"
)
// ErrMACInvalid signals that a MAC verification failed
......
......@@ -6,23 +6,23 @@ import (
"net"
"time"
ci "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/sec"
ci "gitlab.dms3.io/p2p/go-p2p-core/crypto"
"gitlab.dms3.io/p2p/go-p2p-core/peer"
"gitlab.dms3.io/p2p/go-p2p-core/sec"
)
// ID is secio's protocol ID (used when negotiating with multistream)
const ID = "/secio/1.0.0"
// 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.
// Use TLS 1.3 (https://gitlab.dms3.io/p2p/go-p2p-tls/) and Noise (https://gitlab.dms3.io/p2p/go-p2p-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.
// Use TLS 1.3 (https://gitlab.dms3.io/p2p/go-p2p-tls/) and Noise (https://gitlab.dms3.io/p2p/go-p2p-noise/) instead.
func New(sk ci.PrivKey) (*Transport, error) {
id, err := peer.IDFromPrivateKey(sk)
if err != nil {
......
......@@ -10,10 +10,10 @@ import (
"testing"
"time"
ci "github.com/libp2p/go-libp2p-core/crypto"
"github.com/libp2p/go-libp2p-core/peer"
"github.com/libp2p/go-libp2p-core/sec"
cst "github.com/libp2p/go-libp2p-testing/suites/sec"
ci "gitlab.dms3.io/p2p/go-p2p-core/crypto"
"gitlab.dms3.io/p2p/go-p2p-core/peer"
"gitlab.dms3.io/p2p/go-p2p-core/sec"
cst "gitlab.dms3.io/p2p/go-p2p-testing/suites/sec"
)
func newTestTransport(t *testing.T, typ, bits int) *Transport {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment