Fix parsing of subject column

This commit is contained in:
Jan Dittberner 2024-01-14 20:37:22 +01:00
parent f15a108bfc
commit 882cc0c138

View file

@ -765,15 +765,15 @@ func parseSubjectStringComponent(identifier, value string, res *x509.Certificate
case "commonName":
res.Subject.CommonName = value
res.DNSNames = append(res.DNSNames, value)
case "organizationName":
case "O", "organizationName":
res.Subject.Organization = append(res.Subject.Organization, value)
case "organizationalUnitName":
case "OU", "organizationalUnitName":
res.Subject.OrganizationalUnit = append(res.Subject.OrganizationalUnit, value)
case "localityName":
case "L", "localityName":
res.Subject.Locality = append(res.Subject.Locality, value)
case "stateOrProvinceName":
case "ST", "stateOrProvinceName":
res.Subject.Province = append(res.Subject.Province, value)
case "countryName":
case "C", "countryName":
res.Subject.Country = append(res.Subject.Country, value)
case "emailAddress":
res.EmailAddresses = append(res.EmailAddresses, value)