static void registerDS(Oid oid, OidGroupEnum group, CultureInfo localeId, String cpsUrl) { String cn = computeOidHash(oid.Value); String entryDN = DsUtils.AddEntry( _baseDsPath, $"CN={cn}", DsUtils.SchemaObjectIdentifier); switch (group) { case OidGroupEnum.ApplicationPolicy: DsUtils.SetEntryProperty(entryDN, DsUtils.PropFlags, 3); break; case OidGroupEnum.IssuancePolicy: DsUtils.SetEntryProperty(entryDN, DsUtils.PropFlags, 2); if (!String.IsNullOrEmpty(cpsUrl)) { DsUtils.SetEntryProperty(entryDN, DsUtils.PropCpsOid, cpsUrl); } break; } DsUtils.SetEntryProperty(entryDN, DsUtils.PropCertTemplateOid, oid.Value); if (localeId == null) { DsUtils.SetEntryProperty(entryDN, DsUtils.PropDisplayName, oid.FriendlyName); } else { DsUtils.SetEntryProperty(entryDN, DsUtils.PropLocalizedOid, $"{localeId.LCID},{oid.FriendlyName}"); } }