Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.6 KiB

  1. The source code in this directory can be used to build a sample Policy Module
  2. for Microsoft Certificate Services. It is meant to run on Windows 2000 or
  3. later. Certificate Services must already be installed.
  4. This policy module should mimic the Standalone policy module that ships with
  5. the Windows 2000 Certificate Services.
  6. Certificate Services calls the Policy Module through the ICertPolicy
  7. interface, and the Policy Module can call back to Certificate Services
  8. through the ICertServerPolicy interface.
  9. Each time Certificate Services receives a certificate request, it passes
  10. control to the ICertPolicy::VerifyRequest method in policy.cpp. The passed
  11. Context parameter is used with the ICertServerPolicy interface to retrieve
  12. properties from the request and potential certificate. The VerifyRequest
  13. method may add, modify or enable Certificate Extensions, modify the NotBefore
  14. and NotAfter dates and Subject name RDN (Relative Distinguished Name) strings
  15. for the potential certificate. It must also perform any validation required,
  16. and decide the disposition of the request. The method should return one of
  17. VR_PENDING, VR_INSTANT_OK or VR_INSTANT_BAD to cause the request to be made
  18. pending, to grant the request and issue the certificate, or to fail the
  19. request.
  20. Once the certpsam.dll DLL is built, its COM interface must be registered
  21. via the following command:
  22. regsvr32 certpsam.dll
  23. Once registered, the Certification Authority management console snapin can
  24. be used to make this the active policy module.
  25. If you wish to see the debug print output from the sample Policy Module,
  26. attach a debugger to the running service process, or stop the Certificate
  27. Services service, then start Certificate Services as a console application
  28. via the following command:
  29. certsrv -z
  30. Files:
  31. ------
  32. atl.cpp -- ActiveX Template Library COM support code
  33. cedebug.cpp -- Implements debug print routine
  34. ceerror.cpp -- Implements error handling routines
  35. ceformat.cpp -- Implements formatting routine
  36. celib.cpp -- Implements support routines
  37. certpsam.cpp -- Implements COM and initialization entry points:
  38. DllMain
  39. DllCanUnloadNow
  40. DllGetClassObject
  41. DllRegisterServer
  42. DllUnregisterServer
  43. certpsam.def -- Exports COM entry points
  44. certpsam.idl -- Interface Definitions
  45. certpsam.rc -- Version Resource
  46. module.cpp -- Implements ICertManageModule
  47. module.h -- Implements ICertManageModule
  48. pch.cpp -- Precompiled Header file
  49. policy.cpp -- Implements ICertPolicy
  50. policy.h -- Implements ICertPolicy
  51. resource.h -- Resource ID definitions