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.

109 lines
2.3 KiB

  1. #ifndef _W3SSL_SERVICE_HXX_
  2. #define _W3SSL_SERVICE_HXX_
  3. /*++
  4. Copyright (c) 2001 Microsoft Corporation
  5. Module Name :
  6. w3ssl.cxx
  7. Abstract:
  8. SSL service for W3SVC.
  9. New SSL service is introduced to IIS6.
  10. In the dedicated (new process mode) it will run
  11. in lsass. That should boost ssl performance by eliminating
  12. context switches and interprocess communication during
  13. SSL handshakes.
  14. In the backward compatibility mode it will not do much.
  15. Service will register with http for ssl processing, but w3svc
  16. will register it's strmfilt and http.sys always uses the
  17. last registered filter so that the one loaded by inetinfo.exe
  18. will be used.
  19. Author:
  20. Jaroslav Dunajsky (Jaroslad) 04-16-2001
  21. Environment:
  22. Win32 - User Mode
  23. Project:
  24. Stream Filter Worker Process
  25. --*/
  26. #define HTTPFILTER_SERVICE_NAME_W L"HTTPFilter"
  27. class W3SSL_SERVICE: public SCM_MANAGER
  28. {
  29. private:
  30. enum INIT_STATUS {
  31. INIT_NONE,
  32. INIT_STRMFILT_LOADED,
  33. INIT_STREAMFILTER,
  34. INIT_STREAMFILTER_STARTED
  35. };
  36. public:
  37. W3SSL_SERVICE()
  38. : SCM_MANAGER( HTTPFILTER_SERVICE_NAME_W ),
  39. _InitStatus( INIT_NONE ),
  40. _hStrmfilt( NULL )
  41. {
  42. }
  43. virtual
  44. ~W3SSL_SERVICE()
  45. {
  46. }
  47. protected:
  48. virtual
  49. HRESULT
  50. OnServiceStart(
  51. VOID
  52. );
  53. virtual
  54. HRESULT
  55. OnServiceStop(
  56. VOID
  57. );
  58. private:
  59. //
  60. // Not implemented
  61. //
  62. W3SSL_SERVICE( const W3SSL_SERVICE& );
  63. W3SSL_SERVICE& operator=( const W3SSL_SERVICE& );
  64. HRESULT
  65. LoadStrmfilt(
  66. VOID
  67. );
  68. HRESULT
  69. UnloadStrmfilt(
  70. VOID
  71. );
  72. // Status of Initialization ( used for proper Cleanup )
  73. INIT_STATUS _InitStatus;
  74. // entrypoints of strmfilt used by HTTPFilter
  75. PFN_STREAM_FILTER_INITIALIZE _fnStreamFilterInitialize;
  76. PFN_STREAM_FILTER_START _fnStreamFilterStart;
  77. PFN_STREAM_FILTER_STOP _fnStreamFilterStop;
  78. PFN_STREAM_FILTER_TERMINATE _fnStreamFilterTerminate;
  79. // handle to strmfilt.dll
  80. HMODULE _hStrmfilt;
  81. };
  82. #endif