internal

package
v0.0.0-...-ba1faf7 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.1.0"

Functions

func GetAlgorithmSpec

func GetAlgorithmSpec(alg string) kmsTypes.SigningAlgorithmSpec

Types

type AwsKmsSigner

type AwsKmsSigner struct{}

AwsKmsSigner demonstrates a custom bundle signing implementation.

func (*AwsKmsSigner) GenerateSignedToken

func (s *AwsKmsSigner) GenerateSignedToken(files []bundle.FileInfo, sc *bundle.SigningConfig, keyID string) (string, error)

GenerateSignedToken demonstrates how to implement the bundle.Signer interface, for the purpose of creating custom bundle signing.

type AwsKmsVerifier

type AwsKmsVerifier struct{}

AwsKmsVerifier demonstrates a custom bundle verification implementation.

func (*AwsKmsVerifier) VerifyBundleSignature

func (v *AwsKmsVerifier) VerifyBundleSignature(sc bundle.SignaturesConfig, bvc *bundle.VerificationConfig) (map[string]bundle.FileInfo, error)

VerifyBundleSignature demonstrates how to implement the bundle.Verifier interface, for the purpose of creating custom bundle verification.

type BundleSignature

type BundleSignature struct {
	Header        header
	Payload       payload
	Signature     string
	SignedMessage string
}

func NewBundleSignature

func NewBundleSignature() (signature BundleSignature)

func (BundleSignature) Algorithm

func (s BundleSignature) Algorithm() string

func (BundleSignature) Encoded

func (s BundleSignature) Encoded() (string, error)

func (BundleSignature) FilesAsMap

func (s BundleSignature) FilesAsMap() map[string]bundle.FileInfo

func (BundleSignature) KeyID

func (s BundleSignature) KeyID() string

func (BundleSignature) MessageToSign

func (s BundleSignature) MessageToSign() (string, error)

func (BundleSignature) Parse

func (s BundleSignature) Parse(signature string) (BundleSignature, error)

func (BundleSignature) WithAlgorithm

func (s BundleSignature) WithAlgorithm(alg string) BundleSignature

func (BundleSignature) WithFiles

func (s BundleSignature) WithFiles(files []bundle.FileInfo) BundleSignature

func (BundleSignature) WithKeyID

func (s BundleSignature) WithKeyID(keyID string) BundleSignature

func (BundleSignature) WithSignature

func (s BundleSignature) WithSignature(sig string) BundleSignature

type KmsSignerVerifier

type KmsSignerVerifier interface {
	Sign(alg kmsTypes.SigningAlgorithmSpec, msg string) (string, error)
	Verify(alg kmsTypes.SigningAlgorithmSpec, msg string, sig string) error
}

func NewKmsSignerVerifier

func NewKmsSignerVerifier(keyID string) (k KmsSignerVerifier, err error)

Jump to

Keyboard shortcuts

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