Movatterモバイル変換


[0]ホーム

URL:


pkix

packagestandard library
go1.25.5Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2025 License:BSD-3-ClauseImports:5Imported by:22,544

Details

Repository

cs.opensource.google/go/go

Links

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeAlgorithmIdentifier

type AlgorithmIdentifier struct {Algorithmasn1.ObjectIdentifierParametersasn1.RawValue `asn1:"optional"`}

AlgorithmIdentifier represents the ASN.1 structure of the same name. SeeRFC5280, section 4.1.1.2.

typeAttributeTypeAndValue

type AttributeTypeAndValue struct {Typeasn1.ObjectIdentifierValueany}

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

typeAttributeTypeAndValueSETadded ingo1.3

type AttributeTypeAndValueSET struct {Typeasn1.ObjectIdentifierValue [][]AttributeTypeAndValue `asn1:"set"`}

AttributeTypeAndValueSET represents a set of ASN.1 sequences ofAttributeTypeAndValue sequences fromRFC 2986 (PKCS #10).

typeCertificateListdeprecated

type CertificateList struct {TBSCertListTBSCertificateListSignatureAlgorithmAlgorithmIdentifierSignatureValueasn1.BitString}

CertificateList represents the ASN.1 structure of the same name. SeeRFC5280, section 5.1. Use Certificate.CheckCRLSignature to verify thesignature.

Deprecated: x509.RevocationList should be used instead.

func (*CertificateList)HasExpired

func (certList *CertificateList) HasExpired(nowtime.Time)bool

HasExpired reports whether certList should have been updated by now.

typeExtension

type Extension struct {Idasn1.ObjectIdentifierCriticalbool `asn1:"optional"`Value    []byte}

Extension represents the ASN.1 structure of the same name. SeeRFC5280, section 4.2.

typeName

type Name struct {Country, Organization, OrganizationalUnit []stringLocality, Province                        []stringStreetAddress, PostalCode                 []stringSerialNumber, CommonNamestring// Names contains all parsed attributes. When parsing distinguished names,// this can be used to extract non-standard attributes that are not parsed// by this package. When marshaling to RDNSequences, the Names field is// ignored, see ExtraNames.Names []AttributeTypeAndValue// ExtraNames contains attributes to be copied, raw, into any marshaled// distinguished names. Values override any attributes with the same OID.// The ExtraNames field is not populated when parsing, see Names.ExtraNames []AttributeTypeAndValue}

Name represents an X.509 distinguished name. This only includes the commonelements of a DN. Note that Name is only an approximation of the X.509structure. If an accurate representation is needed, asn1.Unmarshal the rawsubject or issuer as anRDNSequence.

func (*Name)FillFromRDNSequence

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

FillFromRDNSequence populates n from the providedRDNSequence.Multi-entry RDNs are flattened, all entries are added to therelevant n fields, and the grouping is not preserved.

func (Name)Stringadded ingo1.10

func (nName) String()string

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

func (Name)ToRDNSequence

func (nName) ToRDNSequence() (retRDNSequence)

ToRDNSequence converts n into a singleRDNSequence. The followingattributes are encoded as multi-value RDNs:

  • Country
  • Organization
  • OrganizationalUnit
  • Locality
  • Province
  • StreetAddress
  • PostalCode

Each ExtraNames entry is encoded as an individual RDN.

typeRDNSequence

type RDNSequence []RelativeDistinguishedNameSET

func (RDNSequence)Stringadded ingo1.10

func (rRDNSequence) String()string

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

typeRelativeDistinguishedNameSET

type RelativeDistinguishedNameSET []AttributeTypeAndValue

typeRevokedCertificate

type RevokedCertificate struct {SerialNumber   *big.IntRevocationTimetime.TimeExtensions     []Extension `asn1:"optional"`}

RevokedCertificate represents the ASN.1 structure of the same name. SeeRFC5280, section 5.1.

typeTBSCertificateListdeprecated

type TBSCertificateList struct {Rawasn1.RawContentVersionint `asn1:"optional,default:0"`SignatureAlgorithmIdentifierIssuerRDNSequenceThisUpdatetime.TimeNextUpdatetime.Time            `asn1:"optional"`RevokedCertificates []RevokedCertificate `asn1:"optional"`Extensions          []Extension          `asn1:"tag:0,optional,explicit"`}

TBSCertificateList represents the ASN.1 structure of the same name. SeeRFC5280, section 5.1.

Deprecated: x509.RevocationList should be used instead.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp