@@ -770,6 +770,78 @@ public void LDAPPropertyProcessor_ReadCertTemplateProperties()
770770
771771 }
772772
773+ [ Fact ]
774+ public void LDAPPropertyProcessor_ReadIssuancePolicyProperties ( )
775+ {
776+ var mock = new MockSearchResultEntry ( "CN\u003d 6250993.11BB1AB25A8A65E9FCDF709FCDD5FBC6,CN\u003d OID,CN\u003d PUBLIC KEY SERVICES,CN\u003d SERVICES,CN\u003d CONFIGURATION,DC\u003d ESC10,DC\u003d LOCAL" ,
777+ new Dictionary < string , object >
778+ {
779+ { "domain" , "ESC10.LOCAL" } ,
780+ { "name" , "KEYADMINSOID@ESC10.LOCAL" } ,
781+ { "domainsid" , "S-1-5-21-3662707843-2053279151-3839588741" } ,
782+ { "description" , null } ,
783+ { "whencreated" , 1712567279 } ,
784+ { "displayname" , "KeyAdminsOID" } ,
785+ { "certtemplateoid" , "1.3.6.1.4.1.311.21.8.4571196.1884641.3293620.10686285.12068043.134.1.30" } ,
786+ { "msds-oidtogrouplink" , "CN=ENTERPRISE KEY ADMINS,CN=USERS,DC=ESC10,DC=LOCAL" }
787+ ,
788+ } , "1E5311A8-E949-4E02-8E08-234ED63200DE" , Label . IssuancePolicy ) ;
789+
790+ var mockLDAPUtils = new MockLDAPUtils ( ) ;
791+ var ldapPropertyProcessor = new LDAPPropertyProcessor ( mockLDAPUtils ) ;
792+
793+
794+ var test = ldapPropertyProcessor . ReadIssuancePolicyProperties ( mock ) ;
795+ var keys = test . Props . Keys ;
796+
797+ //These are not common properties
798+ Assert . DoesNotContain ( "domain" , keys ) ;
799+ Assert . DoesNotContain ( "name" , keys ) ;
800+ Assert . DoesNotContain ( "domainsid" , keys ) ;
801+
802+ Assert . Contains ( "description" , keys ) ;
803+ Assert . Contains ( "whencreated" , keys ) ;
804+ Assert . Contains ( "displayname" , keys ) ;
805+ Assert . Contains ( "certtemplateoid" , keys ) ;
806+ Assert . Contains ( "oidgrouplink" , keys ) ;
807+ }
808+
809+ [ Fact ]
810+ public void LDAPPropertyProcessor_ReadIssuancePolicyProperties_NoOIDGroupLink ( )
811+ {
812+ var mock = new MockSearchResultEntry ( "CN\u003d 6250993.11BB1AB25A8A65E9FCDF709FCDD5FBC6,CN\u003d OID,CN\u003d PUBLIC KEY SERVICES,CN\u003d SERVICES,CN\u003d CONFIGURATION,DC\u003d ESC10,DC\u003d LOCAL" ,
813+ new Dictionary < string , object >
814+ {
815+ { "domain" , "ESC10.LOCAL" } ,
816+ { "name" , "KEYADMINSOID@ESC10.LOCAL" } ,
817+ { "domainsid" , "S-1-5-21-3662707843-2053279151-3839588741" } ,
818+ { "description" , null } ,
819+ { "whencreated" , 1712567279 } ,
820+ { "displayname" , "KeyAdminsOID" } ,
821+ { "certtemplateoid" , "1.3.6.1.4.1.311.21.8.4571196.1884641.3293620.10686285.12068043.134.1.30" } ,
822+ { "msds-oidtogrouplink" , null }
823+ ,
824+ } , "1E5311A8-E949-4E02-8E08-234ED63200DE" , Label . IssuancePolicy ) ;
825+
826+ var mockLDAPUtils = new MockLDAPUtils ( ) ;
827+ var ldapPropertyProcessor = new LDAPPropertyProcessor ( mockLDAPUtils ) ;
828+
829+
830+ var test = ldapPropertyProcessor . ReadIssuancePolicyProperties ( mock ) ;
831+ var keys = test . Props . Keys ;
832+
833+ //These are not common properties
834+ Assert . DoesNotContain ( "domain" , keys ) ;
835+ Assert . DoesNotContain ( "name" , keys ) ;
836+ Assert . DoesNotContain ( "domainsid" , keys ) ;
837+ Assert . DoesNotContain ( "oidgrouplink" , keys ) ;
838+
839+ Assert . Contains ( "description" , keys ) ;
840+ Assert . Contains ( "whencreated" , keys ) ;
841+ Assert . Contains ( "displayname" , keys ) ;
842+ Assert . Contains ( "certtemplateoid" , keys ) ;
843+ }
844+
773845 [ Fact ]
774846 public void LDAPPropertyProcessor_ParseAllProperties ( )
775847 {
0 commit comments