version: 1.10

package pkix

import "crypto/x509/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 AlgorithmIdentifier

  1. type AlgorithmIdentifier struct {
  2. Algorithm asn1.ObjectIdentifier
  3. Parameters asn1.RawValue `asn1:"optional"`
  4. }

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

type AttributeTypeAndValue

  1. type AttributeTypeAndValue struct {
  2. Type asn1.ObjectIdentifier
  3. Value interface{}
  4. }

AttributeTypeAndValue mirrors the ASN.1 structure of the same name in
http://tools.ietf.org/html/rfc5280#section-4.1.2.4

type AttributeTypeAndValueSET

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

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

type CertificateList

  1. type CertificateList struct {
  2. TBSCertList TBSCertificateList
  3. SignatureAlgorithm AlgorithmIdentifier
  4. SignatureValue asn1.BitString
  5. }

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

func (*CertificateList) HasExpired

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

HasExpired reports whether certList should have been updated by now.

type Extension

  1. type Extension struct {
  2. Id asn1.ObjectIdentifier
  3. Critical bool `asn1:"optional"`
  4. Value []byte
  5. }

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

type Name

  1. type Name struct {
  2. Country, Organization, OrganizationalUnit []string
  3. Locality, Province []string
  4. StreetAddress, PostalCode []string
  5. SerialNumber, CommonName string
  6.  
  7. Names []AttributeTypeAndValue
  8. ExtraNames []AttributeTypeAndValue
  9. }

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.

func (*Name) FillFromRDNSequence

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

func (Name) String

  1. func (n Name) String() string

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

func (Name) ToRDNSequence

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

type RDNSequence

  1. type RDNSequence []RelativeDistinguishedNameSET

func (RDNSequence) String

  1. func (r RDNSequence) String() string

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

type RelativeDistinguishedNameSET

  1. type RelativeDistinguishedNameSET []AttributeTypeAndValue

type RevokedCertificate

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

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

type TBSCertificateList

  1. type TBSCertificateList struct {
  2. Raw asn1.RawContent
  3. Version int `asn1:"optional,default:0"`
  4. Signature AlgorithmIdentifier
  5. Issuer RDNSequence
  6. ThisUpdate time.Time
  7. NextUpdate time.Time `asn1:"optional"`
  8. RevokedCertificates []RevokedCertificate `asn1:"optional"`
  9. Extensions []Extension `asn1:"tag:0,optional,explicit"`
  10. }

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