signedmessage

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	Certificates []*certificate.Container
	Content      *unsigneddata.Container
	SignedData   *signeddata.Container
}

Container represent Cryptographic Message Syntax (CMS) with Signed-data Content Type - RFC5652

func (*Container) EncodeToDER

func (cms *Container) EncodeToDER() ([]byte, error)

func (*Container) EncodeToPEM

func (cms *Container) EncodeToPEM() ([]byte, error)

func (*Container) FindCertificateSigner

func (cms *Container) FindCertificateSigner(caList []*certificate.Container) (*certificate.Container, error)

FindCertificateSigner find certificate signer

func (*Container) GetCertificateSerialNumber

func (cms *Container) GetCertificateSerialNumber() *big.Int

GetCertificateSerialNumber - returns Signer first Certificate serial number.

func (*Container) GetEncryptedDigest

func (cms *Container) GetEncryptedDigest() []byte

func (*Container) IsValidOnDate

func (cms *Container) IsValidOnDate(date time.Time) bool

type CryptographicMessage

type CryptographicMessage interface {
	GetCertificateSerialNumber() *big.Int
	IsValidOnDate(date time.Time) bool
	FindCertificateSigner(caList []*certificate.Container) (*certificate.Container, error)
	GetEncryptedDigest() []byte
	EncodeToDER() ([]byte, error)
	EncodeToPEM() ([]byte, error)
}

func DecodeContentInfoContainer

func DecodeContentInfoContainer(info *contentinfo.Container) (CryptographicMessage, error)

func DecodeDER

func DecodeDER(derData []byte) (CryptographicMessage, error)

DecodeDER - Parse parses a Container from the given DER data.

func DecodePEM

func DecodePEM(pemData []byte) (CryptographicMessage, error)

func DecodePEMFile

func DecodePEMFile(file string) (CryptographicMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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