mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-05-02 06:16:08 -04:00
api: add functions to transparently handle signatures upon API interaction (#2142)
This commit is contained in:
parent
002c3a9a32
commit
dac690656e
45 changed files with 707 additions and 472 deletions
|
@ -6,7 +6,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
|
||||
package cmd
|
||||
|
||||
import "context"
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/edgelesssys/constellation/v2/internal/sigstore"
|
||||
)
|
||||
|
||||
// singleUUIDVerifier constructs a RekorVerifier that returns a single UUID and no errors,
|
||||
// and should work for most tests on the happy path.
|
||||
|
@ -39,6 +43,10 @@ type stubCosignVerifier struct {
|
|||
verifyError error
|
||||
}
|
||||
|
||||
func (v *stubCosignVerifier) VerifySignature(_, _, _ []byte) error {
|
||||
func newStubCosignVerifier(_ []byte) (sigstore.Verifier, error) {
|
||||
return &stubCosignVerifier{}, nil
|
||||
}
|
||||
|
||||
func (v *stubCosignVerifier) VerifySignature(_, _ []byte) error {
|
||||
return v.verifyError
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue