From 882cc0c1381baf3eadc2f9efddcfc9c3d6ef6064 Mon Sep 17 00:00:00 2001 From: Jan Dittberner Date: Sun, 14 Jan 2024 20:37:22 +0100 Subject: [PATCH] Fix parsing of subject column --- internal/legacydb/legacydb.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/legacydb/legacydb.go b/internal/legacydb/legacydb.go index 12beafd..8594a9b 100644 --- a/internal/legacydb/legacydb.go +++ b/internal/legacydb/legacydb.go @@ -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)