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.

66 lines
1.3 KiB

  1. /* user.h */
  2. /*********************************/
  3. /* Definitions */
  4. /*********************************/
  5. /*********************************/
  6. /* Structure Definitions */
  7. /*********************************/
  8. /*********************************/
  9. /* Function Definitions */
  10. /*********************************/
  11. extern DWORD
  12. logonUser(
  13. LPCSTR pszUserID,
  14. DWORD dwFlags,
  15. DWORD dwProvType,
  16. LPCSTR szProvName,
  17. HCRYPTPROV *phUID);
  18. extern DWORD
  19. logoffUser(
  20. Context_t *context);
  21. // Read the user record
  22. extern DWORD
  23. readUserKeys(
  24. IN Context_t *pContext,
  25. IN DWORD dwKeysetType);
  26. extern DWORD
  27. writeUserKeys(
  28. Context_t *context);
  29. //
  30. // Routine : ProtectPrivKey
  31. //
  32. // Description : Encrypts the private key and persistently stores it.
  33. //
  34. extern DWORD
  35. ProtectPrivKey(
  36. IN OUT Context_t *pContext,
  37. IN LPWSTR szPrompt,
  38. IN DWORD dwFlags,
  39. IN BOOL fSigKey);
  40. //
  41. // Routine : UnprotectPrivKey
  42. //
  43. // Description : Decrypts the private key. If the fAlwaysDecrypt flag is set
  44. // then it checks if the private key is already in the buffer
  45. // and if so then it does not decrypt.
  46. //
  47. extern DWORD
  48. UnprotectPrivKey(
  49. IN OUT Context_t *pContext,
  50. IN LPWSTR szPrompt,
  51. IN BOOL fSigKey,
  52. IN BOOL fAlwaysDecrypt);