Debian Codegraph @

pkg/signature/dsse/multidsse.go

raw symbols SCIP
1 //
2 // Copyright 2021 The Sigstore Authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15
16 package dssescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/
17
18 import (
19 "contextscip-go gomod github.com/golang/go/src go1.25.0 context/"
20 "cryptoscip-go gomod github.com/golang/go/src go1.25.0 crypto/"
21 "encoding/jsonscip-go gomod github.com/golang/go/src go1.25.0 `encoding/json`/"
22 "errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/"
23 "fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/"
24 "ioscip-go gomod github.com/golang/go/src go1.25.0 io/"
25
26 "github.com/secure-systems-lab/go-securesystemslib/dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/"
27 "github.com/sigstore/sigstore/pkg/signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/"
28 )
29
30 type wrappedMultiSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner# struct {
31 sLAdaptersscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#sLAdapters. []dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.Signerscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Signer#
32 payloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#payloadType. string
33 }
34
35 // WrapMultiSigner returns a signature.Signer that uses the DSSE encoding format
36 func WrapMultiSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiSigner().(payloadType string, sL ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Signer#) signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Signer# {
37 signerAdapterL := make([]dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.Signerscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Signer#, 0, len(sL))
38 for _, s := range sL {
39 pub, err := s.PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyProvider#PublicKey.()
40 if err != nil {
41 return nil
42 }
43
44 keyID, err := dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.SHA256KeyIDscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/SHA256KeyID().(pub)
45 if err != nil {
46 keyID = ""
47 }
48
49 signerAdapter := &SignerAdapterscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/SignerAdapter#{
50 SignatureSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/SignerAdapter#SignatureSigner.: s,
51 Pubscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/SignerAdapter#Pub.: s.PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyProvider#PublicKey.,
52 PubKeyIDscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/SignerAdapter#PubKeyID.: keyID, // We do not want to limit verification to a specific key.
53 }
54
55 signerAdapterL = append(signerAdapterL, signerAdapter)
56 }
57
58 return &wrappedMultiSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#{
59 sLAdaptersscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#sLAdapters.: signerAdapterL,
60 payloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#payloadType.: payloadType,
61 }
62 }
63
64 // PublicKey returns the public key associated with the signer
65 func (wL *wrappedMultiSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#) PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#PublicKey().(_ ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.PublicKeyOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyOption#) (cryptoscip-go gomod github.com/golang/go/src go1.25.0 crypto/.PublicKeyscip-go gomod github.com/golang/go/src go1.25.0 crypto/PublicKey#, error) {
66 return nil, errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().("not supported for multi signatures")
67 }
68
69 // SignMessage signs the provided stream in the reader using the DSSE encoding format
70 func (wL *wrappedMultiSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#) SignMessagescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#SignMessage().(r ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Readerscip-go gomod github.com/golang/go/src go1.25.0 io/Reader#, _ ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.SignOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/SignOption#) ([]byte, error) {
71 p, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadAllscip-go gomod github.com/golang/go/src go1.25.0 io/ReadAll().(r)
72 if err != nil {
73 return nil, err
74 }
75
76 envSigner, err := dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.NewEnvelopeSignerscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/NewEnvelopeSigner().(wL.sLAdaptersscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#sLAdapters....)
77 if err != nil {
78 return nil, err
79 }
80
81 env, err := envSigner.SignPayloadscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/EnvelopeSigner#SignPayload().(contextscip-go gomod github.com/golang/go/src go1.25.0 context/.Backgroundscip-go gomod github.com/golang/go/src go1.25.0 context/Background().(), wL.payloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSigner#payloadType., p)
82 if err != nil {
83 return nil, err
84 }
85
86 return jsonscip-go gomod github.com/golang/go/src go1.25.0 `encoding/json`/.Marshalscip-go gomod github.com/golang/go/src go1.25.0 `encoding/json`/Marshal().(env)
87 }
88
89 type wrappedMultiVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier# struct {
90 vLAdaptersscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#vLAdapters. []dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.Verifierscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Verifier#
91 thresholdscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#threshold. int
92 cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg. wrapConfigscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrapConfig#
93 }
94
95 // WrapMultiVerifier returns a signature.Verifier that uses the DSSE encoding format.
96 //
97 // Deprecated: Use WrapMultiVerifierWithOpts instead.
98 func WrapMultiVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiVerifier().(payloadType string, threshold int, vL ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier#) signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier# {
99 return WrapMultiVerifierWithOptsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiVerifierWithOpts().(payloadType, threshold, vL)
100 }
101
102 // WrapMultiVerifierWithOpts returns a signature.Verifier that uses the DSSE encoding format.
103 // If payloadType is non-empty, WithExpectedPayloadType is automatically applied
104 // before any caller-supplied options.
105 func WrapMultiVerifierWithOptsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiVerifierWithOpts().(payloadType string, threshold int, vL []signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier#, opts ...Optionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/Option#) signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier# {
106 if payloadType != "" {
107 opts = append([]Optionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/Option#{WithExpectedPayloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WithExpectedPayloadType().(payloadType)}, opts...)
108 }
109 verifierAdapterL := make([]dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.Verifierscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Verifier#, 0, len(vL))
110 for _, v := range vL {
111 pub, err := v.PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyProvider#PublicKey.()
112 if err != nil {
113 return nil
114 }
115
116 keyID, err := dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.SHA256KeyIDscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/SHA256KeyID().(pub)
117 if err != nil {
118 keyID = ""
119 }
120
121 verifierAdapter := &VerifierAdapterscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/VerifierAdapter#{
122 SignatureVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/VerifierAdapter#SignatureVerifier.: v,
123 Pubscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/VerifierAdapter#Pub.: v.PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyProvider#PublicKey.,
124 PubKeyIDscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/VerifierAdapter#PubKeyID.: keyID, // We do not want to limit verification to a specific key.
125 }
126
127 verifierAdapterL = append(verifierAdapterL, verifierAdapter)
128 }
129
130 cfg := applyWrapOptsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/applyWrapOpts().(opts)
131 return &wrappedMultiVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#{
132 vLAdaptersscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#vLAdapters.: verifierAdapterL,
133 thresholdscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#threshold.: threshold,
134 cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg.: cfg,
135 }
136 }
137
138 // PublicKey returns the public key associated with the signer
139 func (wL *wrappedMultiVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#) PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#PublicKey().(_ ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.PublicKeyOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyOption#) (cryptoscip-go gomod github.com/golang/go/src go1.25.0 crypto/.PublicKeyscip-go gomod github.com/golang/go/src go1.25.0 crypto/PublicKey#, error) {
140 return nil, errorsscip-go gomod github.com/golang/go/src go1.25.0 errors/.Newscip-go gomod github.com/golang/go/src go1.25.0 errors/New().("not supported for multi signatures")
141 }
142
143 // VerifySignature verifies the signature specified in an DSSE envelope
144 func (wL *wrappedMultiVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#) VerifySignaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#VerifySignature().(s, _ ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Readerscip-go gomod github.com/golang/go/src go1.25.0 io/Reader#, _ ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.VerifyOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/VerifyOption#) error {
145 sig, err := ioscip-go gomod github.com/golang/go/src go1.25.0 io/.ReadAllscip-go gomod github.com/golang/go/src go1.25.0 io/ReadAll().(s)
146 if err != nil {
147 return err
148 }
149
150 env := dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.Envelopescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Envelope#{}
151 if err := jsonscip-go gomod github.com/golang/go/src go1.25.0 `encoding/json`/.Unmarshalscip-go gomod github.com/golang/go/src go1.25.0 `encoding/json`/Unmarshal().(sig, &env); err != nil {
152 return err
153 }
154
155 if wL.cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg..expectedPayloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrapConfig#expectedPayloadType. != "" && env.PayloadTypescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Envelope#PayloadType. != wL.cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg..expectedPayloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrapConfig#expectedPayloadType. {
156 return fmtscip-go gomod github.com/golang/go/src go1.25.0 fmt/.Errorfscip-go gomod github.com/golang/go/src go1.25.0 fmt/Errorf().("dsse: unexpected payload type: got %q, want %q", env.PayloadTypescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/Envelope#PayloadType., wL.cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg..expectedPayloadTypescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrapConfig#expectedPayloadType.)
157 }
158
159 envVerifier, err := dssescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/.NewMultiEnvelopeVerifierscip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/NewMultiEnvelopeVerifier().(wL.thresholdscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#threshold., wL.vLAdaptersscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#vLAdapters....)
160 if err != nil {
161 return err
162 }
163
164 _, payload, err := envVerifier.VerifyAndDecodescip-go gomod github.com/secure-systems-lab/go-securesystemslib v0.11.0 `github.com/secure-systems-lab/go-securesystemslib/dsse`/EnvelopeVerifier#VerifyAndDecode().(contextscip-go gomod github.com/golang/go/src go1.25.0 context/.Backgroundscip-go gomod github.com/golang/go/src go1.25.0 context/Background().(), &env)
165 if err != nil {
166 return err
167 }
168 if wL.cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg..decodedPayloadscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrapConfig#decodedPayload. != nil {
169 *wL.cfgscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiVerifier#cfg..decodedPayloadscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrapConfig#decodedPayload. = payload
170 }
171 return nil
172 }
173
174 // WrapMultiSignerVerifier returns a signature.SignerVerifier that uses the DSSE encoding format.
175 //
176 // Deprecated: Use WrapMultiSignerVerifierWithOpts instead.
177 func WrapMultiSignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiSignerVerifier().(payloadType string, threshold int, svL ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.SignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/SignerVerifier#) signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.SignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/SignerVerifier# {
178 return WrapMultiSignerVerifierWithOptsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiSignerVerifierWithOpts().(payloadType, threshold, svL)
179 }
180
181 // WrapMultiSignerVerifierWithOpts returns a signature.SignerVerifier that uses the DSSE encoding format.
182 // The payloadType is automatically enforced during verification via
183 // WrapMultiVerifierWithOpts; callers may supply additional Option values.
184 func WrapMultiSignerVerifierWithOptsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiSignerVerifierWithOpts().(payloadType string, threshold int, svL []signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.SignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/SignerVerifier#, opts ...Optionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/Option#) signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.SignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/SignerVerifier# {
185 signerL := make([]signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Signer#, 0, len(svL))
186 verifierL := make([]signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier#, 0, len(svL))
187 for _, sv := range svL {
188 signerL = append(signerL, sv)
189 verifierL = append(verifierL, sv)
190 }
191
192 sL := WrapMultiSignerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiSigner().(payloadType, signerL...)
193 vL := WrapMultiVerifierWithOptsscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/WrapMultiVerifierWithOpts().(payloadType, threshold, verifierL, opts...)
194
195 return &wrappedMultiSignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#{
196 signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#signer.: sL,
197 verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#verifier.: vL,
198 }
199 }
200
201 type wrappedMultiSignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier# struct {
202 signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#signer. signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Signer#
203 verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#verifier. signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.Verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier#
204 }
205
206 // PublicKey returns the public key associated with the verifier
207 func (w *wrappedMultiSignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#) PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#PublicKey().(opts ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.PublicKeyOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyOption#) (cryptoscip-go gomod github.com/golang/go/src go1.25.0 crypto/.PublicKeyscip-go gomod github.com/golang/go/src go1.25.0 crypto/PublicKey#, error) {
208 return w.signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#signer..PublicKeyscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/PublicKeyProvider#PublicKey.(opts...)
209 }
210
211 // VerifySignature verifies the signature specified in an DSSE envelope
212 func (w *wrappedMultiSignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#) VerifySignaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#VerifySignature().(s, r ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Readerscip-go gomod github.com/golang/go/src go1.25.0 io/Reader#, opts ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.VerifyOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/VerifyOption#) error {
213 return w.verifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#verifier..VerifySignaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Verifier#VerifySignature.(s, r, opts...)
214 }
215
216 // SignMessage signs the provided stream in the reader using the DSSE encoding format
217 func (w *wrappedMultiSignerVerifierscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#) SignMessagescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#SignMessage().(r ioscip-go gomod github.com/golang/go/src go1.25.0 io/.Readerscip-go gomod github.com/golang/go/src go1.25.0 io/Reader#, opts ...signaturescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/.SignOptionscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/SignOption#) ([]byte, error) {
218 return w.signerscip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature/dsse`/wrappedMultiSignerVerifier#signer..SignMessagescip-go gomod github.com/sigstore/sigstore . `github.com/sigstore/sigstore/pkg/signature`/Signer#SignMessage.(r, opts...)
219 }