mirror of
https://github.com/golang/go
synced 2024-11-24 22:57:57 -07:00
crypto/x509/pkix/pkix: Add missing RFC 5280 RDN OIDs
RFC 5280 section 4.1.2.4 states that conforming implementations must/should expect a list of attribute types in Subject and Issuer names. Some of the required attributes were not supported by pkix.String(). This commit adds support for the missing RDN attributes.
This commit is contained in:
parent
08543f0715
commit
70abb7b408
@ -24,15 +24,24 @@ type AlgorithmIdentifier struct {
|
||||
type RDNSequence []RelativeDistinguishedNameSET
|
||||
|
||||
var attributeTypeNames = map[string]string{
|
||||
"2.5.4.6": "C",
|
||||
"2.5.4.10": "O",
|
||||
"2.5.4.11": "OU",
|
||||
"2.5.4.3": "CN",
|
||||
"2.5.4.5": "SERIALNUMBER",
|
||||
"2.5.4.7": "L",
|
||||
"2.5.4.8": "ST",
|
||||
"2.5.4.9": "STREET",
|
||||
"2.5.4.17": "POSTALCODE",
|
||||
"2.5.4.6": "C",
|
||||
"2.5.4.10": "O",
|
||||
"2.5.4.11": "OU",
|
||||
"2.5.4.3": "CN",
|
||||
"2.5.4.5": "SERIALNUMBER",
|
||||
"2.5.4.7": "L",
|
||||
"2.5.4.8": "ST",
|
||||
"2.5.4.9": "STREET",
|
||||
"2.5.4.17": "POSTALCODE",
|
||||
"0.9.2342.19200300.100.1.25": "DC", // domainComponent
|
||||
"2.5.4.46": "DNQUALIFIER",
|
||||
"1.2.840.113549.1.9.1": "EMAIL", // emailAddress
|
||||
"2.5.4.12": "TITLE",
|
||||
"2.5.4.4": "SN", // surname
|
||||
"2.5.4.42": "GIVENNAME",
|
||||
"2.5.4.43": "INITIALS",
|
||||
"2.5.4.44": "GENERATIONQUALIFIER",
|
||||
"2.5.4.65": "PSEUDONYM",
|
||||
}
|
||||
|
||||
// String returns a string representation of the sequence r,
|
||||
|
Loading…
Reference in New Issue
Block a user