Name represents an X.509 distinguished name. This only includes the common
elements of a DN. Note that Name is only an approximation of the X.509
structure. If an accurate representation is needed, asn1.Unmarshal the raw
subject or issuer as an RDNSequence.
CommonNamestringCountry[]string
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.
Locality[]string
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.
Organization[]stringOrganizationalUnit[]stringPostalCode[]stringProvince[]stringSerialNumberstringStreetAddress[]string
FillFromRDNSequence populates n from the provided RDNSequence.
Multi-entry RDNs are flattened, all entries are added to the
relevant n fields, and the grouping is not preserved.
String returns the string form of n, roughly following
the RFC 2253 Distinguished Names syntax.
ToRDNSequence converts n into a single RDNSequence. The following
attributes are encoded as multi-value RDNs:
- Country
- Organization
- OrganizationalUnit
- Locality
- Province
- StreetAddress
- PostalCode
Each ExtraNames entry is encoded as an individual RDN.
appendRDNs appends a relativeDistinguishedNameSET to the given RDNSequence
and returns the new value. The relativeDistinguishedNameSET contains an
attributeTypeAndValue for each of the given values. See RFC 5280, A.1, and
search for AttributeTypeAndValue.
T : fmt.Stringer
T : context.stringer
T : runtime.stringer
The pages are generated with Goldsv0.4.2. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.