mirror of
https://github.com/containers/podman.git
synced 2025-12-05 21:32:22 +08:00
The change in healthcheck_run_test.go, depends on the containers/image change: commit b6afa8ca7b324aca8fd5a7b5b206fc05c0c04874 Author: Mikhail Sokolov <msokolov@evolution.com> Date: Fri Mar 15 13:37:44 2024 +0200 Add support for Docker HealthConfig.StartInterval (v25.0.0+) Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
30 lines
807 B
Go
30 lines
807 B
Go
package signature
|
|
|
|
import "bytes"
|
|
|
|
// SimpleSigning is a “simple signing” signature.
|
|
type SimpleSigning struct {
|
|
untrustedSignature []byte
|
|
}
|
|
|
|
// SimpleSigningFromBlob converts a “simple signing” signature into a SimpleSigning object.
|
|
func SimpleSigningFromBlob(blobChunk []byte) SimpleSigning {
|
|
return SimpleSigning{
|
|
untrustedSignature: bytes.Clone(blobChunk),
|
|
}
|
|
}
|
|
|
|
func (s SimpleSigning) FormatID() FormatID {
|
|
return SimpleSigningFormat
|
|
}
|
|
|
|
// blobChunk returns a representation of signature as a []byte, suitable for long-term storage.
|
|
// Almost everyone should use signature.Blob() instead.
|
|
func (s SimpleSigning) blobChunk() ([]byte, error) {
|
|
return bytes.Clone(s.untrustedSignature), nil
|
|
}
|
|
|
|
func (s SimpleSigning) UntrustedSignature() []byte {
|
|
return bytes.Clone(s.untrustedSignature)
|
|
}
|