fix deprecated call to key.Bytes

This commit is contained in:
Marten Seemann 2021-07-23 12:09:01 +02:00
parent aaa62b9eed
commit aa3fa7d693
1 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ var _ = Describe("Transport", func() {
tooShortSignature := func(identity *Identity) {
key, _, err := ci.GenerateSecp256k1Key(rand.Reader)
Expect(err).ToNot(HaveOccurred())
keyBytes, err := key.GetPublic().Bytes()
keyBytes, err := ci.MarshalPublicKey(key.GetPublic())
Expect(err).ToNot(HaveOccurred())
data, err := asn1.Marshal(signedKey{
PubKey: keyBytes,
@ -306,7 +306,7 @@ var _ = Describe("Transport", func() {
invalidSignature := func(identity *Identity) {
key, _, err := ci.GenerateSecp256k1Key(rand.Reader)
Expect(err).ToNot(HaveOccurred())
keyBytes, err := key.GetPublic().Bytes()
keyBytes, err := ci.MarshalPublicKey(key.GetPublic())
Expect(err).ToNot(HaveOccurred())
signature, err := key.Sign([]byte("foobar"))
Expect(err).ToNot(HaveOccurred())