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.

41 lines
1.4 KiB

  1. // Called once, determines which settings we're using
  2. class CReg;
  3. void AuthInitialize(CReg *, BOOL *pfBasicAuth, BOOL *pfNTLMAuth);
  4. // state information for NTLM auth scheme, 1 per request.
  5. // NOTE: In the middle of an httpd request using NTLM, this structure
  6. // must be maintained. This is evident in HttpConnectionThread in httpmain.cpp
  7. typedef enum
  8. {
  9. NTLM_NO_INIT_LIB = 0, // Needs the libraries, fcn setup. Per session
  10. NTLM_NO_INIT_CONTEXT, // needs context structures to be initialized. Per request
  11. NTLM_PROCESSING, // in the middle of request, keep structures around.
  12. NTLM_DONE // Set after 2nd NTLM pass, it's either failed. Remove context, not library.
  13. } NTLM_CONVERSATION;
  14. typedef struct
  15. {
  16. NTLM_CONVERSATION m_Conversation; // Are we in the middle of a request?
  17. BOOL m_fHaveCredHandle; // Is m_hcred initialized?
  18. CredHandle m_hcred;
  19. BOOL m_fHaveCtxtHandle; // Is m_hctxt initialized?
  20. struct _SecHandle m_hctxt;
  21. } AUTH_NTLM, *PAUTH_NTLM;
  22. // Functions used each session
  23. BOOL HandleBasicAuth(PSTR pszData, PSTR* ppszUser, PSTR *ppszPassword,
  24. AUTHLEVEL* pAuth, PAUTH_NTLM pNTLMState, WCHAR *wszVRootUserList);
  25. BOOL NTLMInitLib(PAUTH_NTLM pNTLMState);
  26. BOOL BasicToNTLM(PAUTH_NTLM pNTLMState, WCHAR * wszPassword, WCHAR * wszRemoteUser,
  27. AUTHLEVEL *pAuth, WCHAR *wszVRootUserList);
  28. void FreeNTLMHandles(PAUTH_NTLM pNTLMState);