Skip to content

Commit

Permalink
add NO_SECURITY_EXTENSION flag
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBK committed Oct 18, 2023
1 parent 50ec50b commit b725115
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CommonLib/Enums/PKIEnrollmentFlag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

namespace SharpHoundCommonLib.Enums
{
// from https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-crtd/ec71fd43-61c2-407b-83c9-b52272dec8a1
// and from certutil.exe -v -dstemplate
[Flags]
public enum PKIEnrollmentFlag : uint
{
Expand All @@ -24,6 +26,7 @@ public enum PKIEnrollmentFlag : uint
INCLUDE_BASIC_CONSTRAINTS_FOR_EE_CERTS = 0x00008000,
ALLOW_PREVIOUS_APPROVAL_KEYBASEDRENEWAL_VALIDATE_REENROLLMENT = 0x00010000,
ISSUANCE_POLICIES_FROM_REQUEST = 0x00020000,
SKIP_AUTO_RENEWAL = 0x00040000
SKIP_AUTO_RENEWAL = 0x00040000,
NO_SECURITY_EXTENSION = 0x00080000
}
}
1 change: 1 addition & 0 deletions src/CommonLib/Processors/LDAPPropertyProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,7 @@ public static Dictionary<string, object> ReadCertTemplateProperties(ISearchResul

props.Add("enrollmentflag", enrollmentFlags);
props.Add("requiresmanagerapproval", enrollmentFlags.HasFlag(PKIEnrollmentFlag.PEND_ALL_REQUESTS));
props.Add("nosecurityextension", enrollmentFlags.HasFlag(PKIEnrollmentFlag.NO_SECURITY_EXTENSION));
}

if (entry.GetIntProperty(LDAPProperties.PKINameFlag, out var nameFlagsRaw))
Expand Down

0 comments on commit b725115

Please sign in to comment.