mirror of
https://github.com/golang/go
synced 2024-11-23 19:40:08 -07:00
crypto/x509: emit PKIX names in a more standard order.
(See referenced bug for details.) Fixes #11966. Change-Id: I91f9c95594cf4fd6d25d9a81f155a643c7a1f8e0 Reviewed-on: https://go-review.googlesource.com/13038 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
cb5bca8e8a
commit
0cced63cc0
@ -129,12 +129,12 @@ func (n Name) appendRDNs(in RDNSequence, values []string, oid asn1.ObjectIdentif
|
||||
|
||||
func (n Name) ToRDNSequence() (ret RDNSequence) {
|
||||
ret = n.appendRDNs(ret, n.Country, oidCountry)
|
||||
ret = n.appendRDNs(ret, n.Organization, oidOrganization)
|
||||
ret = n.appendRDNs(ret, n.OrganizationalUnit, oidOrganizationalUnit)
|
||||
ret = n.appendRDNs(ret, n.Locality, oidLocality)
|
||||
ret = n.appendRDNs(ret, n.Province, oidProvince)
|
||||
ret = n.appendRDNs(ret, n.Locality, oidLocality)
|
||||
ret = n.appendRDNs(ret, n.StreetAddress, oidStreetAddress)
|
||||
ret = n.appendRDNs(ret, n.PostalCode, oidPostalCode)
|
||||
ret = n.appendRDNs(ret, n.Organization, oidOrganization)
|
||||
ret = n.appendRDNs(ret, n.OrganizationalUnit, oidOrganizationalUnit)
|
||||
if len(n.CommonName) > 0 {
|
||||
ret = n.appendRDNs(ret, []string{n.CommonName}, oidCommonName)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user