Documentation
¶
Index ¶
- Constants
- Variables
- func CanonicalPackageSignaturePayload(sig pluginpkg.PackageSignature) ([]byte, error)
- func SignatureForPackage(pkg pluginpkg.Package, keyID string, publisherID string, pluginID string, ...) (pluginpkg.PackageSignature, error)
- type Ed25519Verifier
- type KeyLookupRequest
- type Keyring
- type SigningKey
- type StaticKeyring
Constants ¶
View Source
const AlgorithmEd25519 = pluginpkg.PackageSignatureAlgorithmEd25519
Variables ¶
View Source
var ( ErrKeyringRequired = errors.New("package signing keyring is required") ErrKeyNotFound = errors.New("package signing key not found") ErrKeyRevoked = errors.New("package signing key is revoked") ErrPublicKeyInvalid = errors.New("package signing public key is invalid") ErrSignatureRequired = errors.New("package signature is required") ErrUnsupportedAlgorithm = errors.New("package signature algorithm is unsupported") ErrSignatureInvalid = errors.New("package signature is invalid") )
Functions ¶
func CanonicalPackageSignaturePayload ¶
func CanonicalPackageSignaturePayload(sig pluginpkg.PackageSignature) ([]byte, error)
func SignatureForPackage ¶
Types ¶
type Ed25519Verifier ¶
func (Ed25519Verifier) VerifyPackageTrust ¶
func (v Ed25519Verifier) VerifyPackageTrust(ctx context.Context, req host.PackageTrustVerificationRequest) (host.PackageTrustVerificationResult, error)
type KeyLookupRequest ¶
type Keyring ¶
type Keyring interface {
LookupPackageSigningKey(ctx context.Context, req KeyLookupRequest) (SigningKey, error)
}
type SigningKey ¶
type SigningKey struct {
Algorithm string `json:"algorithm"`
KeyID string `json:"key_id"`
PublisherID string `json:"publisher_id,omitempty"`
PluginID string `json:"plugin_id,omitempty"`
PublicKey ed25519.PublicKey `json:"-"`
Revoked bool `json:"revoked,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
}
type StaticKeyring ¶
type StaticKeyring struct {
Keys []SigningKey
}
func (StaticKeyring) LookupPackageSigningKey ¶
func (k StaticKeyring) LookupPackageSigningKey(_ context.Context, req KeyLookupRequest) (SigningKey, error)
Click to show internal directories.
Click to hide internal directories.