mirror of https://github.com/containers/image.git
remove containers_image_rekor_stub build tag
It was added for debian so they could build without the deps but this is no longer needed. Get rid of it to simplify the codebase. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
7d8f7bdc69
commit
d6dc9dd318
|
|
@ -61,7 +61,6 @@ or use the build tags described below to avoid the dependencies (e.g. using `go
|
|||
- `containers_image_openpgp`: Use a Golang-only OpenPGP implementation for signature verification instead of the default cgo/gpgme-based implementation;
|
||||
the primary downside is that creating new signatures with the Golang-only implementation is not supported.
|
||||
- `containers_image_storage_stub`: Don’t import the `containers-storage:` transport in `github.com/containers/image/transports/alltransports`, to decrease the amount of required dependencies. Use a stub which reports that the transport is not supported instead.
|
||||
- `containers_image_rekor_stub`: Don't import sigstore/reckor code, all rekor operations will return an error code
|
||||
|
||||
## [Contributing](CONTRIBUTING.md)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
//go:build !containers_image_rekor_stub
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
//go:build containers_image_rekor_stub
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"time"
|
||||
)
|
||||
|
||||
// VerifyRekorSET verifies that unverifiedRekorSET is correctly signed by publicKey and matches the rest of the data.
|
||||
// Returns bundle upload time on success.
|
||||
func VerifyRekorSET(publicKeys []*ecdsa.PublicKey, unverifiedRekorSET []byte, unverifiedKeyOrCertBytes []byte, unverifiedBase64Signature string, unverifiedPayloadBytes []byte) (time.Time, error) {
|
||||
return time.Time{}, NewInvalidSignatureError("rekor disabled at compile-time")
|
||||
}
|
||||
|
|
@ -1,5 +1,3 @@
|
|||
//go:build !containers_image_rekor_stub
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
//go:build !containers_image_rekor_stub
|
||||
|
||||
package rekor
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
//go:build containers_image_rekor_stub
|
||||
|
||||
package rekor
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
|
||||
signerInternal "github.com/containers/image/v5/signature/sigstore/internal"
|
||||
)
|
||||
|
||||
func WithRekor(rekorURL *url.URL) signerInternal.Option {
|
||||
return func(s *signerInternal.SigstoreSigner) error {
|
||||
return fmt.Errorf("rekor disabled at build time")
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue