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.

81 lines
2.1 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1999
  3. Module Name:
  4. mschapp - MS-CHAP Password Change API
  5. Abstract:
  6. These APIs correspond to the MS-CHAP RFC -2433 sections 9 and 10. In order
  7. to develop an MS-CHAP RAS server that works with an NT domain, these APIs
  8. are required.
  9. Only wide (Unicode) versions of these apis will be available. These are the
  10. 2 callable APIs:
  11. * MSChapSrvChangePassword
  12. * MsChapSrvChangePassword2
  13. --*/
  14. #ifndef _MSCHAPP_H_
  15. #define _MSCHAPP_H_
  16. #ifndef _NTCRYPT_
  17. #define CYPHER_BLOCK_LENGTH 8
  18. typedef struct _CYPHER_BLOCK {
  19. CHAR data[CYPHER_BLOCK_LENGTH];
  20. }CYPHER_BLOCK;
  21. typedef struct _LM_OWF_PASSWORD {
  22. CYPHER_BLOCK data[2];
  23. } LM_OWF_PASSWORD;
  24. typedef LM_OWF_PASSWORD * PLM_OWF_PASSWORD;
  25. typedef LM_OWF_PASSWORD NT_OWF_PASSWORD;
  26. typedef NT_OWF_PASSWORD * PNT_OWF_PASSWORD;
  27. typedef struct _SAMPR_ENCRYPTED_USER_PASSWORD {
  28. UCHAR Buffer[ (256 * 2) + 4 ];
  29. } SAMPR_ENCRYPTED_USER_PASSWORD, *PSAMPR_ENCRYPTED_USER_PASSWORD;
  30. typedef struct _ENCRYPTED_LM_OWF_PASSWORD {
  31. CYPHER_BLOCK data[2];
  32. };
  33. typedef ENCRYPTED_LM_OWF_PASSWORD ENCRYPTED_NT_OWF_PASSWORD;
  34. #endif
  35. //
  36. // Change a password.
  37. //
  38. extern WINADVAPI DWORD WINAPI
  39. MSChapSrvChangePassword(
  40. IN LPWSTR ServerName,
  41. IN LPWSTR UserName,
  42. IN BOOLEAN LmOldPresent,
  43. IN PLM_OWF_PASSWORD LmOldOwfPassword,
  44. IN PLM_OWF_PASSWORD LmNewOwfPassword,
  45. IN PNT_OWF_PASSWORD NtOldOwfPassword,
  46. IN PNT_OWF_PASSWORD NtNewOwfPassword);
  47. //
  48. // Change a password using mutual encryption.
  49. //
  50. extern WINADVAPI DWORD WINAPI
  51. MSChapSrvChangePassword2(
  52. IN LPWSTR ServerName,
  53. IN LPWSTR UserName,
  54. IN PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldNt,
  55. IN PENCRYPTED_NT_OWF_PASSWORD OldNtOwfPasswordEncryptedWithNewNt,
  56. IN BOOLEAN LmPresent,
  57. IN PSAMPR_ENCRYPTED_USER_PASSWORD NewPasswordEncryptedWithOldLm,
  58. IN PENCRYPTED_LM_OWF_PASSWORD OldLmOwfPasswordEncryptedWithNewLmOrNt);
  59. #endif // _MSCHAPP_H_