Skip to content

Commit

Permalink
chore: add a test for new property
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar committed Apr 4, 2024
1 parent f77c9f4 commit 546b797
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/unit/LDAPPropertyTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using CommonLibTest.Facades;
using SharpHoundCommonLib;
using SharpHoundCommonLib.Enums;
using SharpHoundCommonLib.OutputTypes;
using SharpHoundCommonLib.Processors;
Expand Down Expand Up @@ -714,9 +715,12 @@ public void LDAPPropertyProcessor_ReadCertTemplateProperties()
{"ekus", new[]
{"1.3.6.1.5.5.7.3.2"}
},
{"certificateapplicationpolicy", new[]
{LDAPProperties.CertificateApplicationPolicy, new[]
{"1.3.6.1.5.5.7.3.2"}
},
{LDAPProperties.CertificatePolicy, new[]
{"1.3.6.1.5.5.7.3.2"}
},
{"authorizedsignatures", 1},
{"applicationpolicies", new[]
{ "1.3.6.1.4.1.311.20.2.1"}
Expand Down Expand Up @@ -754,6 +758,12 @@ public void LDAPPropertyProcessor_ReadCertTemplateProperties()
Assert.Contains("subjectrequireemail", keys);
Assert.Contains("ekus", keys);
Assert.Contains("certificateapplicationpolicy", keys);
var hasPolicy = test.TryGetValue("certificatepolicy", out var policies);
Assert.True(hasPolicy);
if (policies is string[] e)
{
Assert.Contains("1.3.6.1.5.5.7.3.2", e);
}
Assert.Contains("authorizedsignatures", keys);
Assert.Contains("applicationpolicies", keys);
Assert.Contains("issuancepolicies", keys);
Expand Down

0 comments on commit 546b797

Please sign in to comment.