pkix
packagestandard libraryThis package is not in the latest version of its module.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
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.
typeAttributeTypeAndValueSET¶added 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)String¶added ingo1.10
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)String¶added 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.