Skip to content

Commit

Permalink
Add CertTemplate properties
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBK committed Sep 13, 2023
1 parent dbd1e6b commit c2bf76d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CommonLib/Processors/LDAPPropertyProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -422,14 +422,18 @@ public static Dictionary<string, object> ReadCertTemplateProperties(ISearchResul
if (entry.GetIntProperty(LDAPProperties.PKIEnrollmentFlag, out var enrollmentFlagsRaw))
{
var enrollmentFlags = (PKIEnrollmentFlag) enrollmentFlagsRaw;
props.Add("enrollmentflag", enrollmentFlags);
props.Add("requiresmanagerapproval", enrollmentFlags.HasFlag(PKIEnrollmentFlag.PEND_ALL_REQUESTS));
}

if (entry.GetIntProperty(LDAPProperties.PKINameFlag, out var nameFlagsRaw))
{
var nameFlags = (PKICertificateNameFlag) nameFlagsRaw;
props.Add("certificatenameflag", nameFlags);
props.Add("enrolleesuppliessubject",
nameFlags.HasFlag(PKICertificateNameFlag.ENROLLEE_SUPPLIES_SUBJECT));
props.Add("subjectaltrequireupn",
nameFlags.HasFlag(PKICertificateNameFlag.SUBJECT_ALT_REQUIRE_UPN));
}

props.Add("ekus", entry.GetArrayProperty(LDAPProperties.ExtendedKeyUsage));
Expand Down

0 comments on commit c2bf76d

Please sign in to comment.