attrmgr

package
v0.0.0-...-95b87ed Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AttrOID = asn1.ObjectIdentifier{1, 2, 3, 4, 5, 6, 7, 8, 1}

	AttrOIDString = "1.2.3.4.5.6.7.8.1"
)

Functions

This section is empty.

Types

type Attribute

type Attribute interface {
	GetName() string

	GetValue() string
}

type AttributeRequest

type AttributeRequest interface {
	GetName() string

	IsRequired() bool
}

type Attributes

type Attributes struct {
	Attrs map[string]string `json:"attrs"`
}

func (*Attributes) Contains

func (a *Attributes) Contains(name string) bool

func (*Attributes) Names

func (a *Attributes) Names() []string

func (*Attributes) True

func (a *Attributes) True(name string) error

func (*Attributes) Value

func (a *Attributes) Value(name string) (string, bool, error)

type Mgr

type Mgr struct{}

func New

func New() *Mgr

func (*Mgr) AddAttributesToCert

func (mgr *Mgr) AddAttributesToCert(attrs *Attributes, cert *x509.Certificate) error

func (*Mgr) GetAttributesFromCert

func (mgr *Mgr) GetAttributesFromCert(cert *x509.Certificate) (*Attributes, error)

func (*Mgr) ProcessAttributeRequests

func (mgr *Mgr) ProcessAttributeRequests(requests []AttributeRequest, attributes []Attribute) (*Attributes, error)

func (*Mgr) ProcessAttributeRequestsForCert

func (mgr *Mgr) ProcessAttributeRequestsForCert(requests []AttributeRequest, attributes []Attribute, cert *x509.Certificate) error

Jump to

Keyboard shortcuts

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