Source code of Windows XP (NT5)
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.

74 lines
1.3 KiB

  1. #ifndef _CERTMAP_HXX_
  2. #define _CERTMAP_HXX_
  3. class IIS_CERTIFICATE_MAPPING
  4. {
  5. public:
  6. IIS_CERTIFICATE_MAPPING();
  7. virtual ~IIS_CERTIFICATE_MAPPING();
  8. LONG
  9. ReferenceCertMapping(
  10. VOID
  11. )
  12. {
  13. return InterlockedIncrement( &_cRefs );
  14. }
  15. LONG
  16. DereferenceCertMapping(
  17. VOID
  18. )
  19. {
  20. LONG cRefs;
  21. cRefs = InterlockedDecrement( &_cRefs );
  22. if ( cRefs == 0 )
  23. {
  24. delete this;
  25. }
  26. return cRefs;
  27. }
  28. static
  29. HRESULT
  30. GetCertificateMapping(
  31. DWORD dwSiteId,
  32. IIS_CERTIFICATE_MAPPING ** ppCertMapping
  33. );
  34. HRESULT
  35. DoMapCredential(
  36. PBYTE pClientCertBlob,
  37. DWORD cbClientCertBlob,
  38. TOKEN_CACHE_ENTRY ** ppCachedToken,
  39. BOOL * pfClientCertDeniedByMapper
  40. );
  41. private:
  42. HRESULT
  43. Read11Mappings(
  44. DWORD dwSiteId
  45. );
  46. HRESULT
  47. ReadWildcardMappings(
  48. DWORD dwSiteId
  49. );
  50. LONG _cRefs;
  51. CIisCert11Mapper * _pCert11Mapper;
  52. CIisRuleMapper * _pCertWildcardMapper;
  53. };
  54. #endif