Documentation
¶
Overview ¶
パッケージ pkix には、ASN.1 パースおよび X.509 証明書、CRL、OCSP のシリアル化に使用される共有の低レベルの構造体が含まれています。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlgorithmIdentifier ¶
type AlgorithmIdentifier struct { Algorithm asn1.ObjectIdentifier Parameters asn1.RawValue `asn1:"optional"` }
AlgorithmIdentifierは、同名のASN.1構造を表します。RFC 5280のセクション4.1.1.2を参照してください。
type AttributeTypeAndValue ¶
type AttributeTypeAndValue struct { Type asn1.ObjectIdentifier Value any }
AttributeTypeAndValueは、RFC 5280、セクション4.1.2.4で同名のASN.1構造体を反映しています。
type AttributeTypeAndValueSET ¶ added in v1.3.0
type AttributeTypeAndValueSET struct { Type asn1.ObjectIdentifier Value [][]AttributeTypeAndValue `asn1:"set"` }
AttributeTypeAndValueSETは、RFC 2986(PKCS#10)からのAttributeTypeAndValueシーケンスの集合を表す。
type CertificateList ¶
type CertificateList struct { TBSCertList TBSCertificateList SignatureAlgorithm AlgorithmIdentifier SignatureValue asn1.BitString }
CertificateListは同名のASN.1構造を表します。RFC 5280、セクション5.1を参照してください。署名を検証するためにCertificate.CheckCRLSignatureを使用します。
廃止予定: 代わりにx509.RevocationListを使用するべきです。
func (*CertificateList) HasExpired ¶
func (certList *CertificateList) HasExpired(now time.Time) bool
HasExpiredは、certListがこの時点で更新されるべきかどうかを報告します。
type Extension ¶
type Extension struct { Id asn1.ObjectIdentifier Critical bool `asn1:"optional"` Value []byte }
Extensionは同名のASN.1構造を表します。RFC 5280、セクション4.2を参照してください。
type Name ¶
type Name struct {
Country, Organization, OrganizationalUnit []string
Locality, Province []string
StreetAddress, PostalCode []string
SerialNumber, CommonName string
// Namesにはすべての解析された属性が含まれています。識別名を解析する際に、
// このフィールドを使用して、このパッケージでは解析されない非標準の属性を抽出できます。
// RDNSequencesに統合する際には、Namesフィールドは無視されますが、ExtraNamesを参照してください。
Names []AttributeTypeAndValue
// ExtraNamesには、マーシャリングされる任意の識別名にコピーされる属性が含まれています。値は、同じOIDを持つ属性を上書きします。ExtraNamesフィールドは、パース時には埋め込まれません。Namesを参照してください。
ExtraNames []AttributeTypeAndValue
}
NameはX.509の識別名を表します。これにはDNの一般的な要素のみが含まれます。なお、NameはX.509の構造の近似値です。正確な表現が必要な場合は、生のsubjectまたはissuerをRDNSequenceとしてasn1.Unmarshalしてください。
func (*Name) FillFromRDNSequence ¶
func (n *Name) FillFromRDNSequence(rdns *RDNSequence)
FillFromRDNSequence は与えられた RDNSequence から n を埋めます。 複数エントリの RDN は平坦化され、すべてのエントリは関連する n フィールドに追加され、グルーピングは保持されません。
func (Name) ToRDNSequence ¶
func (n Name) ToRDNSequence() (ret RDNSequence)
ToRDNSequenceはnを単一のRDNSequenceに変換します。次の属性は複数値のRDNとしてエンコードされます: - 国 - 組織 - 組織単位 - 地域 - 県 - 住所 - 郵便番号 各ExtraNamesエントリは個別のRDNとしてエンコードされます。
type RDNSequence ¶
type RDNSequence []RelativeDistinguishedNameSET
func (RDNSequence) String ¶ added in v1.10.0
func (r RDNSequence) String() string
Stringは、シーケンスrの文字列表現を返します。 おおよそRFC 2253の特定名の構文に従います。
type RelativeDistinguishedNameSET ¶
type RelativeDistinguishedNameSET []AttributeTypeAndValue
type RevokedCertificate ¶
type RevokedCertificate struct { SerialNumber *big.Int RevocationTime time.Time Extensions []Extension `asn1:"optional"` }
RevokedCertificateは同名のASN.1構造を表します。詳細はRFC 5280のセクション5.1を参照してください。
type TBSCertificateList ¶
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"` }
TBSCertificateListは、同じ名前のASN.1構造を表します。RFC 5280、セクション5.1を参照してください。
廃止予定:代わりにx509.RevocationListを使用するべきです。