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.

97 lines
1.7 KiB

  1. #ifndef _IISCERTMAP_HXX_
  2. #define _IISCERTMAP_HXX_
  3. /*++
  4. Copyright (c) 1998 Microsoft Corporation
  5. Module Name :
  6. iiscertmap.hxx
  7. Abstract:
  8. IIS Certificate mapping
  9. Author:
  10. Bilal Alam (BAlam) 19-Apr-2000
  11. Environment:
  12. Win32 - User Mode
  13. Project:
  14. Stream Filter Worker Process
  15. --*/
  16. class W3_MAIN_CONTEXT;
  17. class IIS_CERTIFICATE_MAPPING
  18. {
  19. public:
  20. IIS_CERTIFICATE_MAPPING();
  21. virtual ~IIS_CERTIFICATE_MAPPING();
  22. LONG
  23. ReferenceCertMapping(
  24. VOID
  25. )
  26. {
  27. return InterlockedIncrement( &_cRefs );
  28. }
  29. LONG
  30. DereferenceCertMapping(
  31. VOID
  32. )
  33. {
  34. LONG cRefs;
  35. cRefs = InterlockedDecrement( &_cRefs );
  36. if ( cRefs == 0 )
  37. {
  38. delete this;
  39. }
  40. return cRefs;
  41. }
  42. static
  43. HRESULT
  44. GetCertificateMapping(
  45. DWORD dwSiteId,
  46. IIS_CERTIFICATE_MAPPING ** ppCertMapping
  47. );
  48. HRESULT
  49. DoMapCredential(
  50. W3_MAIN_CONTEXT * pMainContext,
  51. PBYTE pClientCertBlob,
  52. DWORD cbClientCertBlob,
  53. TOKEN_CACHE_ENTRY ** ppCachedToken,
  54. BOOL * pfClientCertDeniedByMapper
  55. );
  56. private:
  57. HRESULT
  58. Read11Mappings(
  59. DWORD dwSiteId
  60. );
  61. HRESULT
  62. ReadWildcardMappings(
  63. DWORD dwSiteId
  64. );
  65. LONG _cRefs;
  66. CIisCert11Mapper * _pCert11Mapper;
  67. CIisRuleMapper * _pCertWildcardMapper;
  68. };
  69. #endif