W3cubDocs

/Go

Package pkix

Overview

Package pkix contains shared, low level structures used for ASN.1 parsing and serialization of X.509 certificates, CRL and OCSP.

Index

Package files

pkix.go

type AlgorithmIdentifierSource

AlgorithmIdentifier represents the ASN.1 structure of the same name. See RFC 5280, section 4.1.1.2.

type AlgorithmIdentifier struct {
    Algorithm  asn1.ObjectIdentifier
    Parameters asn1.RawValue `asn1:"optional"`
}

type AttributeTypeAndValueSource

AttributeTypeAndValue mirrors the ASN.1 structure of the same name in RFC 5280, Section 4.1.2.4.

type AttributeTypeAndValue struct {
    Type  asn1.ObjectIdentifier
    Value interface{}
}

type AttributeTypeAndValueSETSource 1.3

AttributeTypeAndValueSET represents a set of ASN.1 sequences of AttributeTypeAndValue sequences from RFC 2986 (PKCS #10).

type AttributeTypeAndValueSET struct {
    Type  asn1.ObjectIdentifier
    Value [][]AttributeTypeAndValue `asn1:"set"`
}

type CertificateListSource

CertificateList represents the ASN.1 structure of the same name. See RFC 5280, section 5.1. Use Certificate.CheckCRLSignature to verify the signature.

type CertificateList struct {
    TBSCertList        TBSCertificateList
    SignatureAlgorithm AlgorithmIdentifier
    SignatureValue     asn1.BitString
}

func (*CertificateList) HasExpiredSource

func (certList *CertificateList) HasExpired(now time.Time) bool

HasExpired reports whether certList should have been updated by now.

type ExtensionSource

Extension represents the ASN.1 structure of the same name. See RFC 5280, section 4.2.

type Extension struct {
    Id       asn1.ObjectIdentifier
    Critical bool `asn1:"optional"`
    Value    []byte
}

type NameSource

Name represents an X.509 distinguished name. This only includes the common elements of a DN. When parsing, all elements are stored in Names and non-standard elements can be extracted from there. When marshaling, elements in ExtraNames are appended and override other values with the same OID.

type Name struct {
    Country, Organization, OrganizationalUnit []string
    Locality, Province                        []string
    StreetAddress, PostalCode                 []string
    SerialNumber, CommonName                  string

    Names      []AttributeTypeAndValue
    ExtraNames []AttributeTypeAndValue // Go 1.5
}

func (*Name) FillFromRDNSequenceSource

func (n *Name) FillFromRDNSequence(rdns *RDNSequence)

func (Name) StringSource 1.10

func (n Name) String() string

String returns the string form of n, roughly following the RFC 2253 Distinguished Names syntax.

func (Name) ToRDNSequenceSource

func (n Name) ToRDNSequence() (ret RDNSequence)

type RDNSequenceSource

type RDNSequence []RelativeDistinguishedNameSET

func (RDNSequence) StringSource 1.10

func (r RDNSequence) String() string

String returns a string representation of the sequence r, roughly following the RFC 2253 Distinguished Names syntax.

type RelativeDistinguishedNameSETSource

type RelativeDistinguishedNameSET []AttributeTypeAndValue

type RevokedCertificateSource

RevokedCertificate represents the ASN.1 structure of the same name. See RFC 5280, section 5.1.

type RevokedCertificate struct {
    SerialNumber   *big.Int
    RevocationTime time.Time
    Extensions     []Extension `asn1:"optional"`
}

type TBSCertificateListSource

TBSCertificateList represents the ASN.1 structure of the same name. See RFC 5280, section 5.1.

type TBSCertificateList struct {
    Raw                 asn1.RawContent
    Version             int `asn1:"optional,default:0"`
    Signature           AlgorithmIdentifier
    Issuer              RDNSequence
    ThisUpdate          time.Time
    NextUpdate          time.Time            `asn1:"optional"`
    RevokedCertificates []RevokedCertificate `asn1:"optional"`
    Extensions          []Extension          `asn1:"tag:0,optional,explicit"`
}

© Google, Inc.
Licensed under the Creative Commons Attribution License 3.0.
https://golang.org/pkg/crypto/x509/pkix/