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.

143 lines
3.7 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: protos.h
  7. //
  8. // Contents: Xtcb Security Package Prototypes
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 2-19-97 RichardW Created
  15. //
  16. //----------------------------------------------------------------------------
  17. SpInitializeFn XtcbInitialize;
  18. SpGetInfoFn XtcbGetInfo;
  19. SpAcceptCredentialsFn XtcbAcceptCredentials;
  20. SpAcquireCredentialsHandleFn XtcbAcquireCredentialsHandle;
  21. SpFreeCredentialsHandleFn XtcbFreeCredentialsHandle;
  22. SpQueryCredentialsAttributesFn XtcbQueryCredentialsAttributes;
  23. SpSaveCredentialsFn XtcbSaveCredentials;
  24. SpGetCredentialsFn XtcbGetCredentials;
  25. SpDeleteCredentialsFn XtcbDeleteCredentials;
  26. SpInitLsaModeContextFn XtcbInitLsaModeContext;
  27. SpDeleteContextFn XtcbDeleteContext;
  28. SpAcceptLsaModeContextFn XtcbAcceptLsaModeContext;
  29. LSA_AP_LOGON_TERMINATED XtcbLogonTerminated;
  30. SpApplyControlTokenFn XtcbApplyControlToken;
  31. LSA_AP_CALL_PACKAGE XtcbCallPackage;
  32. LSA_AP_CALL_PACKAGE XtcbCallPackageUntrusted;
  33. SpShutdownFn XtcbShutdown;
  34. SpGetUserInfoFn XtcbGetUserInfo;
  35. SpInstanceInitFn XtcbInstanceInit;
  36. SpInitUserModeContextFn XtcbInitUserModeContext;
  37. SpMakeSignatureFn XtcbMakeSignature;
  38. SpVerifySignatureFn XtcbVerifySignature;
  39. SpSealMessageFn XtcbSealMessage;
  40. SpUnsealMessageFn XtcbUnsealMessage;
  41. SpGetContextTokenFn XtcbGetContextToken;
  42. SpQueryContextAttributesFn XtcbQueryContextAttributes;
  43. SpDeleteContextFn XtcbDeleteUserModeContext;
  44. SpCompleteAuthTokenFn XtcbCompleteAuthToken;
  45. SpFormatCredentialsFn XtcbFormatCredentials;
  46. SpMarshallSupplementalCredsFn XtcbMarshallSupplementalCreds;
  47. SpGetExtendedInformationFn XtcbGetExtendedInformation ;
  48. SpQueryContextAttributesFn XtcbQueryLsaModeContext ;
  49. //////////////////////////////
  50. //
  51. // Misc. Utility functions
  52. //
  53. //////////////////////////////
  54. BOOL
  55. XtcbDupSecurityString(
  56. PSECURITY_STRING Dest,
  57. PSECURITY_STRING Source
  58. );
  59. BOOL
  60. XtcbDupStringToSecurityString(
  61. PSECURITY_STRING Dest,
  62. PWSTR Source
  63. );
  64. BOOL
  65. XtcbCaptureAuthData(
  66. PVOID pvAuthData,
  67. PSEC_WINNT_AUTH_IDENTITY * AuthData
  68. );
  69. BOOL
  70. XtcbGenerateChallenge(
  71. PUCHAR Challenge,
  72. ULONG Length,
  73. PULONG Actual
  74. );
  75. BOOL
  76. XtcbAnsiStringToSecurityString(
  77. PSECURITY_STRING Dest,
  78. PSTRING Source
  79. );
  80. BOOL
  81. XtcbSecurityStringToAnsiString(
  82. PSTRING Dest,
  83. PSECURITY_STRING Source
  84. );
  85. PXTCB_PAC
  86. XtcbCreatePacForCaller(
  87. VOID
  88. );
  89. SECURITY_STATUS
  90. XtcbBuildInitialToken(
  91. PXTCB_CREDS Creds,
  92. PXTCB_CONTEXT Context,
  93. PSECURITY_STRING Target,
  94. PSECURITY_STRING Group,
  95. PUCHAR ServerKey,
  96. PUCHAR GroupKey,
  97. PUCHAR ClientKey,
  98. PUCHAR * Token,
  99. PULONG TokenLen
  100. );
  101. BOOL
  102. XtcbParseInputToken(
  103. IN PUCHAR Token,
  104. IN ULONG TokenLength,
  105. OUT PSECURITY_STRING Client,
  106. OUT PSECURITY_STRING Group
  107. );
  108. SECURITY_STATUS
  109. XtcbAuthenticateClient(
  110. PXTCB_CONTEXT Context,
  111. PUCHAR Token,
  112. ULONG TokenLength,
  113. PUCHAR ClientKey,
  114. PUCHAR GroupKey,
  115. PUCHAR MyKey
  116. );
  117. SECURITY_STATUS
  118. XtcbBuildReplyToken(
  119. PXTCB_CONTEXT Context,
  120. ULONG fContextReq,
  121. PSecBuffer pOutput
  122. );