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.

145 lines
3.6 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (c) Microsoft Corporation 2000
  6. //
  7. // File: credman.h
  8. //
  9. // Contents: Structures and prototyps for accessing credential manager
  10. //
  11. //
  12. // History: 23-Feb-2000 Created Jeffspel
  13. //
  14. //------------------------------------------------------------------------
  15. #ifndef __CREDMAN_H__
  16. #define __CREDMGR_H__
  17. VOID
  18. KerbFreeCredmanList(KERBEROS_LIST CredmanList);
  19. VOID
  20. KerbDereferenceCredmanCred(
  21. IN PKERB_CREDMAN_CRED Cred,
  22. IN PKERBEROS_LIST CredmanList
  23. );
  24. VOID
  25. KerbLogCredmanError(
  26. IN PKERB_CREDMAN_CRED Cred,
  27. IN NTSTATUS Status
  28. );
  29. NTSTATUS
  30. KerbInitPrimaryCreds(
  31. IN PKERB_LOGON_SESSION LogonSession,
  32. IN PUNICODE_STRING UserString,
  33. IN PUNICODE_STRING DomainString,
  34. IN PUNICODE_STRING PrincipalName,
  35. IN PUNICODE_STRING PasswordString, // either the password or if pin
  36. IN BOOLEAN PubKeyCreds,
  37. IN OPTIONAL PCERT_CONTEXT pCertContext,
  38. OUT PKERB_PRIMARY_CREDENTIAL * PrimaryCreds
  39. );
  40. NTSTATUS
  41. CredpExtractMarshalledTargetInfo(
  42. IN PUNICODE_STRING TargetServerName,
  43. OUT CREDENTIAL_TARGET_INFORMATIONW **pTargetInfo
  44. );
  45. VOID
  46. KerbReferenceCredmanCred(
  47. IN PKERB_CREDMAN_CRED Cred,
  48. IN PKERB_LOGON_SESSION LogonSession,
  49. IN BOOLEAN Unlink
  50. );
  51. NTSTATUS
  52. KerbAddCredmanCredToLogonSession(
  53. IN PKERB_LOGON_SESSION pLogonSession,
  54. IN PKERB_PRIMARY_CREDENTIAL CredToMatch,
  55. IN ULONG AdditionalCredFlags,
  56. IN OUT PKERB_CREDMAN_CRED *NewCred
  57. );
  58. NTSTATUS
  59. KerbRetrieveOWF(
  60. IN PKERB_LOGON_SESSION LogonSession,
  61. IN PKERB_CREDENTIAL Credential,
  62. IN PKERB_CREDMAN_CRED CredmanCred,
  63. IN PUNICODE_STRING CredTargetName,
  64. IN OUT PKERB_QUERY_SUPPLEMENTAL_CREDS_RESPONSE * Response,
  65. IN OUT PULONG ResponseSize
  66. );
  67. NTSTATUS
  68. KerbCheckUserNameForCert(
  69. IN PLUID ClientLogonId,
  70. IN BOOLEAN fImpersonateClient,
  71. IN UNICODE_STRING *pUserName,
  72. OUT PCERT_CONTEXT *ppCertContext
  73. );
  74. NTSTATUS
  75. KerbConvertCertCredential(
  76. IN PKERB_LOGON_SESSION LogonSession,
  77. IN LPCWSTR MarshalledCredential,
  78. IN PUNICODE_STRING TargetName,
  79. IN OUT PKERB_PRIMARY_CREDENTIAL * PrimaryCredential
  80. );
  81. NTSTATUS
  82. KerbTicklePackage(
  83. IN PKERB_LOGON_SESSION LogonSession,
  84. IN PUNICODE_STRING CredentialBlob
  85. );
  86. NTSTATUS
  87. KerbAddCertCredToPrimaryCredential(
  88. IN PKERB_LOGON_SESSION pLogonSession,
  89. IN PUNICODE_STRING pTargetName,
  90. IN PCERT_CONTEXT pCertContext,
  91. IN PUNICODE_STRING pPin,
  92. IN ULONG CredFlags,
  93. IN OUT PKERB_PRIMARY_CREDENTIAL *ppCredMgrCred);
  94. NTSTATUS
  95. KerbCheckCredMgrForGivenTarget(
  96. IN PKERB_LOGON_SESSION pLogonSession,
  97. IN PKERB_CREDENTIAL Credential,
  98. IN PUNICODE_STRING SuppliedTargetName,
  99. IN PKERB_INTERNAL_NAME pTargetName,
  100. IN ULONG TargetInfoFlags,
  101. IN PUNICODE_STRING pTargetDomainName,
  102. IN PUNICODE_STRING pTargetForestName,
  103. IN OUT PKERB_CREDMAN_CRED *CredmanCred,
  104. IN OUT PBYTE *pbMarshalledTargetInfo,
  105. IN OUT ULONG *cbMarshalledTargetInfo
  106. );
  107. VOID
  108. KerbNotifyCredentialManager(
  109. IN PKERB_LOGON_SESSION LogonSession,
  110. IN PKERB_CHANGEPASSWORD_REQUEST ChangeRequest,
  111. IN PKERB_INTERNAL_NAME ClientName,
  112. IN PUNICODE_STRING RealmName
  113. );
  114. NTSTATUS
  115. KerbProcessUserNameCredential(
  116. IN PUNICODE_STRING MarshalledUserName,
  117. OUT PUNICODE_STRING UserName,
  118. OUT PUNICODE_STRING DomainName,
  119. OUT PUNICODE_STRING Password
  120. );
  121. #define RAS_CREDENTIAL 0x1
  122. #endif // __CREDMAN_H__