aboutsummaryrefslogtreecommitdiff
path: root/pkg/types/crypto_test.go
diff options
context:
space:
mode:
authorRasmus Dahlberg <rasmus@mullvad.net>2022-05-21 20:31:09 +0200
committerRasmus Dahlberg <rasmus@mullvad.net>2022-06-21 19:46:54 +0200
commit97540f9ded30f68f9fda62f66f3006414cbfd5b7 (patch)
tree329db21d4e63aba70711d8e897fd95713f1cc1f9 /pkg/types/crypto_test.go
parent1f9ec26e11052e1ab24b854e997404a42ef5bfd0 (diff)
move mock signer to internal/
Diffstat (limited to 'pkg/types/crypto_test.go')
-rw-r--r--pkg/types/crypto_test.go15
1 files changed, 0 insertions, 15 deletions
diff --git a/pkg/types/crypto_test.go b/pkg/types/crypto_test.go
index d95d5fa..181c8f0 100644
--- a/pkg/types/crypto_test.go
+++ b/pkg/types/crypto_test.go
@@ -4,24 +4,9 @@ import (
"crypto"
"crypto/ed25519"
"crypto/rand"
- "io"
"testing"
)
-type testSigner struct {
- PublicKey PublicKey
- Signature Signature
- Error error
-}
-
-func (ts *testSigner) Public() crypto.PublicKey {
- return ed25519.PublicKey(ts.PublicKey[:])
-}
-
-func (ts *testSigner) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error) {
- return ts.Signature[:], ts.Error
-}
-
func newKeyPair(t *testing.T) (crypto.Signer, PublicKey) {
vk, sk, err := ed25519.GenerateKey(rand.Reader)
if err != nil {