earsigner

package
v0.0.0-...-4e66fdd Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

README

Configuration

  • ear-signer: stanza containing the configuration details about the attestation result signing process. The supported directives are:
    • alg: the JWS algorithm used for signing, e.g.: ES256, RS512.
    • key: file containing the private key to be used with alg. The key is in JWK format.

Documentation

Overview

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Copyright 2023 Contributors to the Veraison project. SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cfg

type Cfg struct {
	Key string `mapstructure:"key"`
	Alg string `mapstructure:"alg"`
}

type IEarSigner

type IEarSigner interface {
	Init(cfg Cfg, fs afero.Fs) error
	Sign(earClaims ear.AttestationResult) ([]byte, error)
	GetEARSigningPublicKey() (jwa.KeyAlgorithm, jwk.Key, error)
	Close() error
}

func New

func New(v *viper.Viper, fs afero.Fs) (IEarSigner, error)

type JWT

type JWT struct {
	Key interface{}
	Alg jwa.KeyAlgorithm
}

func (*JWT) Close

func (o *JWT) Close() error

func (JWT) GetEARSigningPublicKey

func (o JWT) GetEARSigningPublicKey() (jwa.KeyAlgorithm, jwk.Key, error)

func (*JWT) Init

func (o *JWT) Init(cfg Cfg, fs afero.Fs) error

func (JWT) Sign

func (o JWT) Sign(earClaims ear.AttestationResult) ([]byte, error)

Jump to

Keyboard shortcuts

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