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.

75 lines
1.6 KiB

  1. #ifndef _UCCONTEXT_HXX_
  2. #define _UCCONTEXT_HXX_
  3. #define SSL_CLIENT_FILTER_CHANNEL_CONTEXT_SIGNATURE (DWORD)'XCLU'
  4. #define SSL_CLIENT_FILTER_CHANNEL_CONTEXT_SIGNATURE_FREE (DWORD)'xclu'
  5. class FILTER_CHANNEL;
  6. class SSL_CLIENT_FILTER_CHANNEL_CONTEXT : public FILTER_CHANNEL_CONTEXT
  7. {
  8. public:
  9. SSL_CLIENT_FILTER_CHANNEL_CONTEXT(FILTER_CHANNEL *);
  10. virtual ~SSL_CLIENT_FILTER_CHANNEL_CONTEXT();
  11. virtual
  12. BOOL
  13. CheckSignature(
  14. VOID
  15. ) const
  16. {
  17. return _dwSignature == SSL_CLIENT_FILTER_CHANNEL_CONTEXT_SIGNATURE;
  18. }
  19. virtual
  20. HRESULT
  21. Create(
  22. VOID
  23. );
  24. };
  25. class SSL_CLIENT_FILTER_CHANNEL : public FILTER_CHANNEL
  26. {
  27. public:
  28. SSL_CLIENT_FILTER_CHANNEL() : FILTER_CHANNEL( HTTP_SSL_CLIENT_FILTER_CHANNEL_NAME ) {};
  29. virtual ~SSL_CLIENT_FILTER_CHANNEL() {};
  30. private:
  31. virtual
  32. HRESULT
  33. CreateContext( FILTER_CHANNEL_CONTEXT ** ppFiltChannelContext )
  34. {
  35. DBG_ASSERT( ppFiltChannelContext != NULL );
  36. HRESULT hr = E_FAIL;
  37. SSL_CLIENT_FILTER_CHANNEL_CONTEXT * pUcContext =
  38. new SSL_CLIENT_FILTER_CHANNEL_CONTEXT( this );
  39. if ( pUcContext != NULL )
  40. {
  41. hr = pUcContext->Create();
  42. if ( FAILED( hr ) )
  43. {
  44. delete pUcContext;
  45. pUcContext = NULL;
  46. }
  47. }
  48. else
  49. {
  50. hr = HRESULT_FROM_WIN32( ERROR_OUTOFMEMORY );
  51. }
  52. *ppFiltChannelContext = pUcContext;
  53. return hr;
  54. }
  55. };
  56. #endif