signerinfo

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeAttributeSliceToDER

func EncodeAttributeSliceToDER(attrs []Attribute) ([]byte, error)

Types

type Attribute

type Attribute struct {
	Type  asn1.ObjectIdentifier
	Value asn1.RawValue `asn1:"set"`
}

Attribute asn.1 CMS RFC5652

type Attributes

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

func (*Attributes) Add

func (attrs *Attributes) Add(attrType asn1.ObjectIdentifier, value interface{})

Add adds the attribute, maintaining insertion order

func (*Attributes) ForMarshalling

func (attrs *Attributes) ForMarshalling() ([]Attribute, error)

type Container

type Container struct {
	Version                   int `asn1:"default:1"`
	IssuerAndSerialNumber     IssuerAndSerial
	DigestAlgorithm           pkix.AlgorithmIdentifier
	AuthenticatedAttributes   []Attribute `asn1:"optional,omitempty,tag:0"`
	DigestEncryptionAlgorithm pkix.AlgorithmIdentifier
	EncryptedDigest           []byte
	UnauthenticatedAttributes []Attribute `asn1:"optional,tag:1"`
}

Container asn.1 CMS struct RFC5652

func (*Container) SetUnauthenticatedAttributes

func (si *Container) SetUnauthenticatedAttributes(extraUnsignedAttrs []Attribute) error

type IssuerAndSerial

type IssuerAndSerial struct {
	IssuerName   asn1.RawValue
	SerialNumber *big.Int
}

IssuerAndSerial asn.1 Signature issuer

Jump to

Keyboard shortcuts

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