pkcs7

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractCertificates

func ExtractCertificates(data []byte) ([]*x509.Certificate, error)

ExtractCertificates reads a SignedData type and returns the embedded certificates (if present in the structure).

Types

type SignedData

type SignedData struct {
	Version          int
	DigestAlgorithms []asn1.RawValue `asn1:"set"`
	ContentInfo      asn1.RawValue
	Certificates     []asn1.RawValue `asn1:"tag:0,optional,set"`
	RevocationLists  []asn1.RawValue `asn1:"tag:1,optional,set"`
	SignerInfos      []asn1.RawValue `asn1:"set"`
}

SignedData contains signed data and related info. Refer to RFC 2315, Section 9.1 for definition of this type.

type SignedDataEnvelope

type SignedDataEnvelope struct {
	Raw        asn1.RawContent
	Type       asn1.ObjectIdentifier
	SignedData SignedData `asn1:"tag:0,explicit,optional"`
}

SignedDataEnvelope represents a wrapped SignedData object found in PEM-encoded PKCS7 blocks.

func ParseSignedData

func ParseSignedData(data []byte) ([]*SignedDataEnvelope, error)

ParseSignedData parses one (or more) signed data blocks from a byte array.

Jump to

Keyboard shortcuts

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