pkixx

package
v0.0.0-...-197daa8 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

forkd from go pkix.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeTypeAndValue

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

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

type AttributeTypeAndValueSET

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

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

type MyRDNSequence

type MyRDNSequence struct {
	Sequence           RDNSequence
	AttributeTypeNames map[string]string
}

func (*MyRDNSequence) SetAttributeTypeName

func (mr *MyRDNSequence) SetAttributeTypeName(m map[string]string)

func (MyRDNSequence) String

func (mr MyRDNSequence) String() string

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

type Name

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

	Names      []AttributeTypeAndValue
	ExtraNames []AttributeTypeAndValue
}

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) String

func (n Name) String() string

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

func (Name) ToRDNSequence

func (n Name) ToRDNSequence() MyRDNSequence

type RDNSequence

type RDNSequence []RelativeDistinguishedNameSET

type RelativeDistinguishedNameSET

type RelativeDistinguishedNameSET []AttributeTypeAndValue

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL