You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Follow-up on the discussions in #3776 - we need to review the functions in https://github.com/sigstore/cosign/blob/main/pkg/cosign/keys.go and move some of them to an internal package (possibly on a major version update for the API backward compatibility; can mark functions as Deprecated until then).
As for the TODOs, I agree this should be in an internal package, this isn't meant to be general purpose.
- @haydentherapper
files that use some of the types and functions in pkg/cosign/keys.go marked with TODO - move to internal, to help
evaluating the impact of the possible changes:
$ rg -l 'cosign\.KeysBytes'
test/helpers.go
pkg/cosign/kubernetes/secret_test.go
pkg/cosign/kubernetes/secret.go
cmd/cosign/cli/generate/generate_key_pair.go
$ rg -l 'cosign\.GeneratePrivateKey'
internal/pkg/cosign/ephemeral/signer.go
internal/pkg/cosign/payload/signer_test.go
internal/pkg/cosign/tsa/signer_test.go
internal/pkg/cosign/fulcio/signer_test.go
internal/pkg/cosign/rekor/signer_test.go
cmd/cosign/cli/sign/sign.go
cmd/cosign/cli/fulcio/fulcio_test.go
$ rg -l 'cosign\.ImportKeyPair'
test/helpers.go
cmd/cosign/cli/importkeypair/import_key_pair.go
$ rg -l 'cosign\.GenerateKeyPair'
test/helpers.go
cmd/cosign/cli/attest/attest_blob_test.go
cmd/cosign/cli/publickey/public_key_test.go
pkg/cosign/git/github/github.go
pkg/cosign/git/gitlab/gitlab.go
pkg/cosign/kubernetes/secret.go
test/e2e_test.go
cmd/cosign/cli/generate/generate_key_pair.go
# NB PemToECDSAKey is used only in the pkg/cosign package, pkg/cosign/keys.go file (no cosign.PemToECDSAKey references):
$ rg PemToECDSAKey
pkg/cosign/keys.go
197:// PemToECDSAKey marshals and returns the PEM-encoded ECDSA public key.
198:func PemToECDSAKey(pemBytes []byte) (*ecdsa.PublicKey, error) {
$ rg -l 'cosign\.LoadPrivateKey'
test/e2e_test.go
Description
Follow-up on the discussions in #3776 - we need to review the functions in https://github.com/sigstore/cosign/blob/main/pkg/cosign/keys.go and move some of them to an internal package (possibly on a major version update for the API backward compatibility; can mark functions as Deprecated until then).
It may be helpful to view the old
TODO(jason)
comments in pkg/cosign/keys.go@bdcbf44ee9.The text was updated successfully, but these errors were encountered: