Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dopey committed Apr 18, 2024
1 parent bd5ad3d commit f72b0ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions command/crl/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ func ParseCRL(b []byte) (*CRL, error) {
return nil, errors.Wrap(err, "error parsing crl")
}

certs := make([]RevokedCertificate, len(crl.RevokedCertificates))
for i, c := range crl.RevokedCertificates {
certs := make([]RevokedCertificate, len(crl.RevokedCertificateEntries))
for i, c := range crl.RevokedCertificateEntries {
certs[i] = newRevokedCertificate(c)
}

Expand Down Expand Up @@ -493,7 +493,7 @@ type RevokedCertificate struct {
SerialNumberBytes []byte `json:"-"`
}

func newRevokedCertificate(c pkix.RevokedCertificate) RevokedCertificate {
func newRevokedCertificate(c x509.RevocationListEntry) RevokedCertificate {
var extensions []Extension

return RevokedCertificate{
Expand Down
1 change: 1 addition & 0 deletions internal/sshutil/sshutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ func parseECDSA(in []byte) (*ecdsa.PublicKey, error) {
return nil, errors.Errorf("unsupported curve %s", w.Curve)
}

//nolint:staticcheck // ignore this deprecation warning - golang will fix
key.X, key.Y = elliptic.Unmarshal(key.Curve, w.KeyBytes)
if key.X == nil || key.Y == nil {
return nil, errors.New("invalid curve point")
Expand Down

0 comments on commit f72b0ce

Please sign in to comment.