Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #26 from ipfs/chore/update-libp2p
Browse files Browse the repository at this point in the history
chore(dep): update libp2p & protobuf
  • Loading branch information
Stebalien authored Dec 3, 2019
2 parents 67f9e24 + e8c4713 commit 1ac4f05
Show file tree
Hide file tree
Showing 13 changed files with 241 additions and 206 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ os:
language: go

go:
- 1.11.x
- 1.13.x

env:
global:
- GOTFLAGS="-race"
matrix:
- BUILD_DEPTYPE=gx
- BUILD_DEPTYPE=gomod


Expand All @@ -24,7 +23,6 @@ script:

cache:
directories:
- $GOPATH/src/gx
- $GOPATH/pkg/mod
- $HOME/.cache/go-build

Expand Down
2 changes: 1 addition & 1 deletion examples/embed.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
pb "github.com/ipfs/go-ipns/pb"

ipns "github.com/ipfs/go-ipns"
crypto "github.com/libp2p/go-libp2p-crypto"
crypto "github.com/libp2p/go-libp2p-core/crypto"
)

// CreateEntryWithEmbed shows how you can create an IPNS entry
Expand Down
6 changes: 2 additions & 4 deletions examples/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

"github.com/ipfs/go-ipns/examples"
crypto "github.com/libp2p/go-libp2p-crypto"
crypto "github.com/libp2p/go-libp2p-core/crypto"
)

var testPath = "/ipfs/Qme1knMqwt1hKZbc1BmQFmnm9f36nyQGwXxPGVpVJ9rMK5"
Expand Down Expand Up @@ -43,9 +43,7 @@ func TestEmbeddedEntryCreation(t *testing.T) {

}
func generateRSAKey() (crypto.PrivKey, error) {
// DO NOT USE 1024 BITS IN PRODUCTION
// THIS IS ONLY FOR TESTING PURPOSES
k, err := examples.GenerateRSAKeyPair(1024)
k, err := examples.GenerateRSAKeyPair(2048)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion examples/key.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package examples

import (
crypto "github.com/libp2p/go-libp2p-crypto"
crypto "github.com/libp2p/go-libp2p-core/crypto"
)

// GenerateRSAKeyPair is used to generate an RSA key pair
Expand Down
11 changes: 6 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
module github.com/ipfs/go-ipns

require (
github.com/gogo/protobuf v1.2.1
github.com/gogo/protobuf v1.3.1
github.com/ipfs/go-ipfs-util v0.0.1
github.com/ipfs/go-log v0.0.1
github.com/libp2p/go-libp2p-crypto v0.0.1
github.com/libp2p/go-libp2p-peer v0.0.1
github.com/libp2p/go-libp2p-peerstore v0.0.1
github.com/libp2p/go-libp2p-record v0.0.1
github.com/libp2p/go-libp2p-core v0.2.5
github.com/libp2p/go-libp2p-peerstore v0.1.4
github.com/libp2p/go-libp2p-record v0.1.2
)

go 1.12
176 changes: 146 additions & 30 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions ipns.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
pb "github.com/ipfs/go-ipns/pb"

u "github.com/ipfs/go-ipfs-util"
ic "github.com/libp2p/go-libp2p-crypto"
peer "github.com/libp2p/go-libp2p-peer"
ic "github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer"
)

// Create creates a new IPNS entry and signs it with the given private key.
Expand Down
6 changes: 3 additions & 3 deletions ipns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"time"

u "github.com/ipfs/go-ipfs-util"
ci "github.com/libp2p/go-libp2p-crypto"
peer "github.com/libp2p/go-libp2p-peer"
ci "github.com/libp2p/go-libp2p-core/crypto"
peer "github.com/libp2p/go-libp2p-core/peer"
)

func TestEmbedPublicKey(t *testing.T) {

sr := u.NewTimeSeededRand()
priv, pub, err := ci.GenerateKeyPairWithReader(ci.RSA, 1024, sr)
priv, pub, err := ci.GenerateKeyPairWithReader(ci.RSA, 2048, sr)
if err != nil {
t.Fatal(err)
}
Expand Down
58 changes: 0 additions & 58 deletions package.json

This file was deleted.

Loading

0 comments on commit 1ac4f05

Please sign in to comment.