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.

102 lines
1.6 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. context.h
  5. Abstract:
  6. SSP Context.
  7. Author:
  8. Cliff Van Dyke (CliffV) 17-Sep-1993
  9. Revision History:
  10. --*/
  11. #ifndef _NTLMSSP_CONTEXT_INCLUDED_
  12. #define _NTLMSSP_CONTEXT_INCLUDED_
  13. #include <rc4.h>
  14. typedef struct _SSP_CONTEXT {
  15. //
  16. // Global list of all Contexts
  17. // (Serialized by SspContextCritSect)
  18. //
  19. LIST_ENTRY Next;
  20. //
  21. // Timeout the context after awhile.
  22. //
  23. DWORD StartTime;
  24. DWORD Interval;
  25. //
  26. // Used to prevent this Context from being deleted prematurely.
  27. //
  28. WORD References;
  29. //
  30. // Maintain the Negotiated protocol
  31. //
  32. ULONG NegotiateFlags;
  33. //
  34. // State of the context
  35. //
  36. enum {
  37. IdleState,
  38. NegotiateSentState, // Outbound context only
  39. ChallengeSentState, // Inbound context only
  40. AuthenticateSentState, // Outbound context only
  41. AuthenticatedState // Inbound context only
  42. } State;
  43. //
  44. // The challenge passed to the client.
  45. // Only valid when in ChallengeSentState.
  46. //
  47. UCHAR Challenge[MSV1_0_CHALLENGE_LENGTH];
  48. PSSP_CREDENTIAL Credential;
  49. ULONG Nonce;
  50. struct RC4_KEYSTRUCT SEC_FAR * Rc4Key;
  51. } SSP_CONTEXT, *PSSP_CONTEXT;
  52. PSSP_CONTEXT
  53. SspContextReferenceContext(
  54. IN PCtxtHandle ContextHandle,
  55. IN BOOLEAN RemoveContext
  56. );
  57. void
  58. SspContextDereferenceContext(
  59. PSSP_CONTEXT Context
  60. );
  61. PSSP_CONTEXT
  62. SspContextAllocateContext(
  63. );
  64. TimeStamp
  65. SspContextGetTimeStamp(
  66. IN PSSP_CONTEXT Context,
  67. IN BOOLEAN GetExpirationTime
  68. );
  69. #endif // ifndef _NTLMSSP_CONTEXT_INCLUDED_