// Name returns the PKIX name for the subject.
Name returns the PKIX name for the subject.
// Name returns the PKIX name for the subject .
func (s *Subject) Name() pkix.Name {
	var name pkix.Name
	name.CommonName = s.CN
	for _, n := range s.Names {
		appendIf(n.C, &name.Country)
		appendIf(n.ST, &name.Province)
		appendIf(n.L, &name.Locality)
		appendIf(n.O, &name.Organization)
		appendIf(n.OU, &name.OrganizationalUnit)
	}
	name.SerialNumber = s.SerialNumber
	return name
}
func ( s * Subject ) Name ( ) pkix . Name { var name pkix . Name name . CommonName = s . CN for _ , n := range s . Names { appendIf ( n . C , & name . Country ) appendIf ( n . ST , & name . Province ) appendIf ( n . L , & name . Locality ) appendIf ( n . O , & name . Organization ) appendIf ( n . OU , & name . OrganizationalUnit ) } name . SerialNumber = s . SerialNumber return name }
Name returns the PKIX name for the subject.
Name returns the PKIX name for the subject .