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.

104 lines
3.2 KiB

  1. //+--------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 2000
  6. //
  7. // File: ntdigest.h
  8. //
  9. // Contents: some general defines for SSP NTDigest
  10. //
  11. // Helper functions:
  12. //
  13. // History: KDamour 10Mar00 Created
  14. //
  15. //---------------------------------------------------------------------
  16. #ifndef NTDIGEST_NTDIGEST_H
  17. #define NTDIGEST_NTDIGEST_H
  18. #define NTDIGEST_TOKEN_NAME_A "WDIGEST"
  19. #define NTDIGEST_DLL_NAME L"wdigest.dll"
  20. #define NTDIGEST_SP_COMMENT_A "Digest Authentication for Windows"
  21. #define NTDIGEST_SP_COMMENT L"Digest Authentication for Windows"
  22. #define NTDIGEST_SP_VERSION 1
  23. // Registry Information
  24. #define REG_DIGEST_BASE TEXT("System\\CurrentControlSet\\Control\\SecurityProviders\\WDigest")
  25. // Values
  26. #define REG_DIGEST_OPT_LIFETIME TEXT("Lifetime")
  27. #define REG_DIGEST_OPT_EXPIRESLEEP TEXT("Expiresleep")
  28. #define REG_DIGEST_OPT_DELEGATION TEXT("Delegation")
  29. #define REG_DIGEST_OPT_NEGOTIATE TEXT("Negotiate")
  30. #define REG_DIGEST_OPT_DEBUGLEVEL TEXT("Debuglevel")
  31. #define REG_DIGEST_OPT_MAXCTXTCOUNT TEXT("MaxContext")
  32. #define REG_DIGEST_OPT_UTF8HTTP TEXT("UTF8HTTP") // allow UTF-8 encoding for HTTP mode
  33. #define REG_DIGEST_OPT_UTF8SASL TEXT("UTF8SASL") // allow UTF-8 encoding for SASL mode
  34. #define NTDIGEST_SP_CAPS (SECPKG_FLAG_TOKEN_ONLY | \
  35. SECPKG_FLAG_IMPERSONATION | \
  36. SECPKG_FLAG_ACCEPT_WIN32_NAME | \
  37. SECPKG_FLAG_DELEGATION | \
  38. SECPKG_FLAG_LOGON )
  39. // SECPKG_FLAG_INTEGRITY | \
  40. // Establish a limit to the sizes of the Auth header values
  41. // From RFC Draft SASL max size if 4096 bytes - seems arbitrary
  42. #define NTDIGEST_SP_MAX_TOKEN_SIZE 4096
  43. // Lifetime for a Nonce - 10 hours
  44. #define PARAMETER_LIFETIME (36000)
  45. #define SASL_MAX_DATA_BUFFER 65536
  46. // Max number of context entries to keep before tossing out old ones
  47. #define PARAMETER_MAXCTXTCOUNT 30000
  48. // BOOL is Delegation is allowed on machine - default is FALSE
  49. #define PARAMETER_DELEGATION FALSE
  50. // BOOL is Nego support is allowed on machine - default is FALSE
  51. #define PARAMETER_NEGOTIATE FALSE
  52. // MILLISECONDS for Sleep for the garbage collector for expired context entries
  53. // Every 15 minutes is a reasonable default 1000*60*15 =
  54. #define PARAMETER_EXPIRESLEEPINTERVAL 900000
  55. // Boolean if challenges should be sent with UTF8 support
  56. #define PARAMETER_UTF8_HTTP TRUE
  57. #define PARAMETER_UTF8_SASL TRUE
  58. // Function Prototypes
  59. void DebugInitialize(void);
  60. VOID DigestWatchParamKey(
  61. PVOID pCtxt,
  62. BOOLEAN fWaitStatus);
  63. BOOL NtDigestReadRegistry(
  64. BOOL fFirstTime);
  65. void ReadDwordRegistrySetting(
  66. HKEY hReadKey,
  67. HKEY hWriteKey,
  68. LPCTSTR pszValueName,
  69. DWORD * pdwValue,
  70. DWORD dwDefaultValue);
  71. void SPUnloadRegOptions(void);
  72. BOOL SPLoadRegOptions(void);
  73. // Some common max sizes
  74. #define NTDIGEST_MAX_REALM_SIZE 256 // should be based on a NT domain size
  75. #endif // NTDIGEST_NTGDIGEST_H