From 1f5a737c1a5c70990821c8dcf7fa247de0a9228d Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Thu, 8 Feb 2024 14:25:07 +0100 Subject: [PATCH] Use ToED25519SignerVerifier Signed-off-by: Riccardo Schirone --- cmd/cosign/cli/sign/sign.go | 8 ++++---- go.mod | 2 +- go.sum | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/cosign/cli/sign/sign.go b/cmd/cosign/cli/sign/sign.go index a2efb385e7f0..2f9c5aa54102 100644 --- a/cmd/cosign/cli/sign/sign.go +++ b/cmd/cosign/cli/sign/sign.go @@ -552,7 +552,7 @@ func keylessSigner(ctx context.Context, ko options.KeyOpts, sv *SignerVerifier) err error ) - fulcioSV, err := AdaptSignerVerifierToFulcio(sv) + fulcioSV, err := adaptSignerVerifierToFulcio(sv) if err != nil { return nil, fmt.Errorf("adapting signer verifier to Fulcio: %w", err) } @@ -629,14 +629,14 @@ func (c *SignerVerifier) Bytes(ctx context.Context) ([]byte, error) { return pemBytes, nil } -// AdaptSignerVerifierToFulcio adapts, if necessary, the SignerVerifier to be used to interact with Fulcio. +// adaptSignerVerifierToFulcio adapts, if necessary, the SignerVerifier to be used to interact with Fulcio. // // This is needed in particular for ED25519 keys with the pre-hashed version of // the algorithm, which is not supported by Fulcio. This function creates a // ED25519 SignerVerifier based on that instead. -func AdaptSignerVerifierToFulcio(sv *SignerVerifier) (*SignerVerifier, error) { +func adaptSignerVerifierToFulcio(sv *SignerVerifier) (*SignerVerifier, error) { if ed25519phSV, ok := sv.SignerVerifier.(*signature.ED25519phSignerVerifier); ok { - signerVerifier, err := ed25519phSV.ConvertToED25519() + signerVerifier, err := ed25519phSV.ToED25519SignerVerifier() if err != nil { return nil, err } diff --git a/go.mod b/go.mod index 955b2234d3f6..c546b6b91237 100644 --- a/go.mod +++ b/go.mod @@ -32,7 +32,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.8.0 github.com/sigstore/fulcio v1.4.3 github.com/sigstore/rekor v1.3.4 - github.com/sigstore/sigstore v1.8.2-0.20240129195947-e1f9a175c451 + github.com/sigstore/sigstore v1.8.2-0.20240206082515-7fa5044eab09 github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.1 github.com/sigstore/sigstore/pkg/signature/kms/azure v1.8.1 github.com/sigstore/sigstore/pkg/signature/kms/gcp v1.8.1 diff --git a/go.sum b/go.sum index b5f75e1a8475..9b7b92854730 100644 --- a/go.sum +++ b/go.sum @@ -608,8 +608,8 @@ github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/sigstore/fulcio v1.4.3 h1:9JcUCZjjVhRF9fmhVuz6i1RyhCc/EGCD7MOl+iqCJLQ= github.com/sigstore/fulcio v1.4.3/go.mod h1:BQPWo7cfxmJwgaHlphUHUpFkp5+YxeJes82oo39m5og= -github.com/sigstore/sigstore v1.8.2-0.20240129195947-e1f9a175c451 h1:ypAyd4AiAndzEED10G5JO/cxSJ2xAERD1aNpWtr8a4Q= -github.com/sigstore/sigstore v1.8.2-0.20240129195947-e1f9a175c451/go.mod h1:rbZxJoss0Qf/OQeIuyqkQxo9jLKZlyLqOGX0BUaK7/I= +github.com/sigstore/sigstore v1.8.2-0.20240206082515-7fa5044eab09 h1:BpZhOReWZECJ1okzh5N9G/UjfoAWPm7Gy58vZHGE9zU= +github.com/sigstore/sigstore v1.8.2-0.20240206082515-7fa5044eab09/go.mod h1:rbZxJoss0Qf/OQeIuyqkQxo9jLKZlyLqOGX0BUaK7/I= github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.1 h1:rEDdUefulkIQaMJyzLwtgPDLNXBIltBABiFYfb0YmgQ= github.com/sigstore/sigstore/pkg/signature/kms/aws v1.8.1/go.mod h1:RCdYCc1IxCYWzh2IdzdA6Yf7JIY0cMRqH08fpQYechw= github.com/sigstore/sigstore/pkg/signature/kms/azure v1.8.1 h1:DvRWG99QGWZC5mp42SEde2Xke/Q384Idnj2da7yB+Mk=