@@ -27,7 +27,6 @@ import (
27
27
coptions "github.com/sigstore/cosign/v2/cmd/cosign/cli/options"
28
28
"github.com/sigstore/cosign/v2/cmd/cosign/cli/rekor"
29
29
"github.com/sigstore/cosign/v2/pkg/cosign"
30
- "github.com/sigstore/cosign/v2/pkg/oci"
31
30
ociremote "github.com/sigstore/cosign/v2/pkg/oci/remote"
32
31
"github.com/sigstore/sigstore/pkg/cryptoutils"
33
32
"github.com/sigstore/sigstore/pkg/signature"
@@ -146,16 +145,11 @@ func NewCosignVerifier(ctx context.Context, opts ...Options) (*CosignVerifier, e
146
145
}, nil
147
146
}
148
147
149
- // verifyImageSignatures verify the authenticity of the given ref OCI image.
150
- func (v * CosignVerifier ) verifyImageSignatures (ctx context.Context , ref name.Reference ) ([]oci.Signature , bool , error ) {
151
- return cosign .VerifyImageSignatures (ctx , ref , v .opts )
152
- }
153
-
154
148
// Verify verifies the authenticity of the given ref OCI image.
155
149
// It returns a boolean indicating if the verification was successful.
156
150
// It returns an error if the verification fails, nil otherwise.
157
151
func (v * CosignVerifier ) Verify (ctx context.Context , ref name.Reference ) (soci.VerificationResult , error ) {
158
- signatures , _ , err := v . verifyImageSignatures (ctx , ref )
152
+ signatures , _ , err := cosign . VerifyImageSignatures (ctx , ref , v . opts )
159
153
if err != nil {
160
154
return soci .VerificationResultFailed , err
161
155
}
0 commit comments