certigo: github.com/square/certigo/pkcs7 Index | Files

package pkcs7

import "github.com/square/certigo/pkcs7"


Package Files


func ExtractCertificates Uses

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

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

func ParseSignedData Uses

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

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

type SignedData Uses

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 Uses

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.

Package pkcs7 imports 3 packages (graph) and is imported by 3 packages. Updated 2017-05-15. Refresh now. Tools for package owners.