rootcertsattr

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ATTR_KEY   = "github.com/mandelsoft/ocm/rootcerts"
	ATTR_SHORT = "rootcerts"
)
View Source
const (
	ConfigType   = "rootcerts" + cfgcpi.OCM_CONFIG_TYPE_SUFFIX
	ConfigTypeV1 = ConfigType + runtime.VersionSeparator + "v1"
)

Variables

View Source
var DefaultAppliers = &Appliers{}

Functions

func RegisterApplier

func RegisterApplier(a ...cfgcpi.ConfigApplier)

func Set

func Set(ctx ContextProvider, attribute *Attribute) error

Types

type Appliers

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

func (*Appliers) Register

func (r *Appliers) Register(a ...cfgcpi.ConfigApplier)

type Attribute

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

func Get

func Get(ctx ContextProvider) *Attribute

func (*Attribute) GetRootCertPool

func (a *Attribute) GetRootCertPool(system bool) *x509.CertPool

func (*Attribute) HasRootCertificates

func (a *Attribute) HasRootCertificates() bool

func (*Attribute) RegisterRootCertificates

func (a *Attribute) RegisterRootCertificates(cert signutils.GenericCertificateChain) error

type AttributeType

type AttributeType struct{}

func (AttributeType) Decode

func (a AttributeType) Decode(data []byte, unmarshaller runtime.Unmarshaler) (interface{}, error)

func (AttributeType) Description

func (a AttributeType) Description() string

func (AttributeType) Encode

func (a AttributeType) Encode(v interface{}, marshaller runtime.Marshaler) ([]byte, error)

func (AttributeType) Name

func (a AttributeType) Name() string

type Config

type Config struct {
	runtime.ObjectVersionedType `json:",inline"`
	RootCertificates            []cfgcpi.ContentSpec `json:"rootCertificates,omitempty"`
}

Config describes a memory based repository interface.

func New

func New() *Config

New creates a new memory ConfigSpec.

func (*Config) AddRootCertificate

func (a *Config) AddRootCertificate(chain signutils.GenericCertificateChain) error

func (*Config) AddRootCertificateData

func (a *Config) AddRootCertificateData(data []byte)

func (*Config) AddRootCertificateFile

func (a *Config) AddRootCertificateFile(name string, fss ...vfs.FileSystem)

func (*Config) ApplyTo

func (a *Config) ApplyTo(ctx cfgcpi.Context, target interface{}) error

func (*Config) ApplyToAttribute

func (a *Config) ApplyToAttribute(attr *Attribute) error

func (*Config) GetType

func (a *Config) GetType() string

type Context

type ContextProvider

type ContextProvider = datacontext.ContextProvider

Jump to

Keyboard shortcuts

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