Use NuGet to download the library and attach to your .NET project:
NuGet\Install-Package ADCS.CertMod.Managed
Two interfaces must be implemented and exposed to COM world in order to create an exit module:
ICertManageModule
ICertExit2
Create a class that inherits from CertManageModule
class and define the following attributes:
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("<ModuleName>.ExitManage")]
[Guid("<00000000-0000-0000-0000-000000000000>")]
public class ExitManage : CertManageModule {
<...>
}
<ModuleName>
is module simple name. The full ProgID must look like MyCoolExitModule.ExitManage
.<00000000-0000-0000-0000-000000000000>
is a randomly generated UUID that identifies your implementation.CertManageModule.GetProperty
method must be overriden.Note: angle brackets are used for reference only, they are not used.
Create a class that inherits from CertExitBase
class and define the following attributes:
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("<ModuleName>.Exit")]
[Guid("<00000000-0000-0000-0000-000000000000>")]
public class MyExitClass : CertExitBase {
<...>
}
<ModuleName>
is module simple name. The full ProgID must look like MyCoolExitModule.Exit
.<00000000-0000-0000-0000-000000000000>
is a randomly generated UUID that identifies your implementation.ICertExit2.GetManageModule
returns an instance of ICertManageModule
implementation (see above).CertExitBase.Notify
method shall be called before executing custom code in Notify
method override.Two interfaces must be implemented and exposed to COM world in order to create an exit module:
ICertManageModule
ICertPolicy2
, or inherit from CertPolicyBase
class directly which provides some base implementation for you.Create a class that inherits from CertManageModule
class and define the following attributes:
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.None)]
[ProgId("<ModuleName>.PolicyManage")]
[Guid("<00000000-0000-0000-0000-000000000000>")]
public class PolicyManage : CertManageModule {
<...>
}
<ModuleName>
is module simple name. The full ProgID must look like MyCoolPolicyModule.PolicyManage
.<00000000-0000-0000-0000-000000000000>
is a randomly generated UUID that identifies your implementation.CertManageModule.GetProperty
method must be implemented.