Skip to content

Commit

Permalink
Fix collection of cert template attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBK committed Sep 14, 2023
1 parent c2bf76d commit 2abe9c0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/CommonLib/LDAPQueries/CommonProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public static class CommonProperties
"certificateTemplates", "flags", "dnshostname", "cacertificate", "mspki-certificate-name-flag",
"mspki-enrollment-flag", "displayname", "name", "mspki-template-schema-version", "mspki-cert-template-oid",
"pKIOverlapPeriod", "pKIExpirationPeriod", "pkiextendedkeyusage", "mspki-ra-signature",
"mspki-ra-application-policies", "mspki-ra-policies", "crosscertificatepair"
"mspki-ra-application-policies", "mspki-ra-policies", "crosscertificatepair",
"mspki-certificate-application-policy"
};
}
}
7 changes: 3 additions & 4 deletions src/CommonLib/Processors/LDAPPropertyProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,14 @@ public static Dictionary<string, object> ReadCertTemplateProperties(ISearchResul
}

props.Add("ekus", entry.GetArrayProperty(LDAPProperties.ExtendedKeyUsage));
props.Add("certificateapplicationpolicy", entry.GetArrayProperty(LDAPProperties.CertificateApplicationPolicy));

if (entry.GetIntProperty(LDAPProperties.NumSignaturesRequired, out var authorizedSignatures))
{
props.Add("authorizedsignatures", authorizedSignatures);
props.Add("applicationpolicies", entry.GetProperty(LDAPProperties.ApplicationPolicies));
props.Add("issuancepolicies", entry.GetProperty(LDAPProperties.IssuancePolicies));
}

props.Add("certificateapplicationpolicy", entry.GetArrayProperty(LDAPProperties.CertificateApplicationPolicy));
props.Add("applicationpolicies", entry.GetArrayProperty(LDAPProperties.ApplicationPolicies));
props.Add("issuancepolicies", entry.GetArrayProperty(LDAPProperties.IssuancePolicies));

return props;
}
Expand Down

0 comments on commit 2abe9c0

Please sign in to comment.