signature

package
v0.0.0-...-fb7f86c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2023 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginManifest

type PluginManifest struct {
	Plugin  string            `json:"plugin"`
	Version string            `json:"version"`
	KeyID   string            `json:"keyId"`
	Time    int64             `json:"time"`
	Files   map[string]string `json:"files"`

	// V2 supported fields
	ManifestVersion string                `json:"manifestVersion"`
	SignatureType   plugins.SignatureType `json:"signatureType"`
	SignedByOrg     string                `json:"signedByOrg"`
	SignedByOrgName string                `json:"signedByOrgName"`
	RootURLs        []string              `json:"rootUrls"`
}

PluginManifest holds details for the file manifest

type Signature

type Signature struct {
	// contains filtered or unexported fields
}

func DefaultCalculator

func DefaultCalculator(cfg *config.Cfg) *Signature

func NewCalculator

func NewCalculator(cfg *config.Cfg, kr plugins.KeyRetriever) *Signature

func ProvideService

func ProvideService(cfg *config.Cfg, kr plugins.KeyRetriever) *Signature

func (*Signature) Calculate

func (*Signature) Verify

func (s *Signature) Verify(ctx context.Context, keyID string, block *clearsign.Block) error

type UnsignedPluginAuthorizer

type UnsignedPluginAuthorizer struct {
	// contains filtered or unexported fields
}

func NewUnsignedAuthorizer

func NewUnsignedAuthorizer(cfg *config.Cfg) *UnsignedPluginAuthorizer

func ProvideOSSAuthorizer

func ProvideOSSAuthorizer(cfg *config.Cfg) *UnsignedPluginAuthorizer

func (*UnsignedPluginAuthorizer) CanLoadPlugin

func (u *UnsignedPluginAuthorizer) CanLoadPlugin(p *plugins.Plugin) bool

type Validation

type Validation struct {
	// contains filtered or unexported fields
}

func NewValidator

func NewValidator(authorizer plugins.PluginLoaderAuthorizer) *Validation

func ProvideValidatorService

func ProvideValidatorService(authorizer plugins.PluginLoaderAuthorizer) *Validation

func (*Validation) ValidateSignature

func (s *Validation) ValidateSignature(plugin *plugins.Plugin) error

type Validator

type Validator interface {
	ValidateSignature(plugin *plugins.Plugin) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL