Skip to content

Commit

Permalink
helpers/derhelpers: remove support for go1.12
Browse files Browse the repository at this point in the history
go1.12 has reached EOL when go1.14 was released in 2020, so it
should be safe to remove now.

Also removing uses of golang.org/x/crypto/ed25519, which is now part of stdlib:

    Beginning with Go 1.13, the functionality of this package was moved to the
    standard library as crypto/ed25519. This package only acts as a compatibility
    wrapper.

This partially reverts e45ead2 / 81e5473

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Nov 6, 2022
1 parent 079aed0 commit 879b1d3
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 56 deletions.
50 changes: 0 additions & 50 deletions helpers/derhelpers/derhelpers-legacy.go

This file was deleted.

2 changes: 0 additions & 2 deletions helpers/derhelpers/derhelpers.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build go1.13

// Package derhelpers implements common functionality
// on DER encoded data
package derhelpers
Expand Down
3 changes: 1 addition & 2 deletions helpers/derhelpers/ed25519.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ package derhelpers

import (
"crypto"
"crypto/ed25519"
"crypto/x509/pkix"
"encoding/asn1"
"errors"

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

var errEd25519WrongID = errors.New("incorrect object identifier")
Expand Down
3 changes: 1 addition & 2 deletions helpers/derhelpers/ed25519_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package derhelpers

import (
"bytes"
"crypto/ed25519"
"encoding/pem"
"testing"

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

var testPubKey = `-----BEGIN PUBLIC KEY-----
Expand Down

0 comments on commit 879b1d3

Please sign in to comment.