Skip to content

Commit

Permalink
Replacing crypto/ed25519 with compatible wrapper
Browse files Browse the repository at this point in the history
https://golang.org/doc/go1.13\#crypto/ed25519 added
the standalone crypto/ed25519 package but it does not
exist below Go 1.13. This change uses the previous /x/
package that in 1.13+ acts as a wrapper for the new
crypto/ed25519 package.
  • Loading branch information
Robert Eperjesi authored and epes committed Nov 25, 2019
1 parent 624f55f commit 0958495
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
* [Stefan Tatschner](https://rumpelsepp.org/contact.html)
* [Hayden James](https://github.com/hjames9)
* [Jozef Kralik](https://github.com/jkralik)
* [Robert Eperjesi](https://github.com/epes)

### License
MIT License - see [LICENSE](LICENSE) for full text
3 changes: 2 additions & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package dtls

import (
"crypto/ecdsa"
"crypto/ed25519"
"crypto/tls"
"crypto/x509"
"time"

"golang.org/x/crypto/ed25519"

"github.com/pion/logging"
)

Expand Down
3 changes: 2 additions & 1 deletion crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package dtls
import (
"crypto"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
Expand All @@ -12,6 +11,8 @@ import (
"encoding/binary"
"math/big"
"time"

"golang.org/x/crypto/ed25519"
)

type ecdsaSignature struct {
Expand Down
3 changes: 2 additions & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package e2e

import (
"crypto/ed25519"
"crypto/rand"
"errors"
"io"
Expand All @@ -11,6 +10,8 @@ import (
"testing"
"time"

"golang.org/x/crypto/ed25519"

"github.com/pion/dtls/v2"
"github.com/pion/transport/test"
)
Expand Down
3 changes: 2 additions & 1 deletion util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package dtls
import (
"crypto"
"crypto/ecdsa"
"crypto/ed25519"
"crypto/elliptic"
"crypto/rand"
"crypto/tls"
Expand All @@ -13,6 +12,8 @@ import (
"encoding/hex"
"math/big"
"time"

"golang.org/x/crypto/ed25519"
)

// Parse a big endian uint24
Expand Down

0 comments on commit 0958495

Please sign in to comment.