d3d9/tests: Fix a test failure on Windows XP with the default VGA driver.
[wine.git] / dlls / schannel / lsamode.c
blobf43150e3d3a4a7da11834ee902427b9ab361aae2
1 /*
2 * LSA-mode functions of the SChannel security provider
4 * Copyright 2007 Yuval Fledel
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #include <stdarg.h>
23 #include "ntstatus.h"
24 #define WIN32_NO_STATUS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "sspi.h"
28 #include "ntsecapi.h"
29 #include "ntsecpkg.h"
30 #include "schannel.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(schannel);
36 /***********************************************************************
37 * SpGetInfoUnified
39 static NTSTATUS WINAPI SpGetInfoUnified(PSecPkgInfoW PackageInfo)
41 TRACE("(%p)\n", PackageInfo);
43 PackageInfo->fCapabilities = SECPKG_FLAG_MUTUAL_AUTH |
44 SECPKG_FLAG_INTEGRITY | SECPKG_FLAG_PRIVACY |
45 SECPKG_FLAG_CONNECTION | SECPKG_FLAG_MULTI_REQUIRED |
46 SECPKG_FLAG_EXTENDED_ERROR | SECPKG_FLAG_IMPERSONATION |
47 SECPKG_FLAG_ACCEPT_WIN32_NAME | SECPKG_FLAG_STREAM;
48 PackageInfo->wVersion = 1;
49 PackageInfo->wRPCID = UNISP_RPC_ID;
50 PackageInfo->cbMaxToken = 0x4000;
51 PackageInfo->Name = (LPWSTR)UNISP_NAME_W;
52 PackageInfo->Comment = (LPWSTR)UNISP_NAME_W;
54 return STATUS_SUCCESS;
57 static SEC_WCHAR schannelCommentW[] = { 'S','c','h','a','n','n','e','l',
58 ' ','S','e','c','u','r','i','t','y',' ','P','a','c','k','a','g','e',0 };
60 /***********************************************************************
61 * SpGetInfoSChannel
63 static NTSTATUS WINAPI SpGetInfoSChannel(PSecPkgInfoW PackageInfo)
65 TRACE("(%p)\n", PackageInfo);
67 PackageInfo->fCapabilities = SECPKG_FLAG_MUTUAL_AUTH |
68 SECPKG_FLAG_INTEGRITY | SECPKG_FLAG_PRIVACY |
69 SECPKG_FLAG_CONNECTION | SECPKG_FLAG_MULTI_REQUIRED |
70 SECPKG_FLAG_EXTENDED_ERROR | SECPKG_FLAG_IMPERSONATION |
71 SECPKG_FLAG_ACCEPT_WIN32_NAME | SECPKG_FLAG_STREAM;
72 PackageInfo->wVersion = 1;
73 PackageInfo->wRPCID = UNISP_RPC_ID;
74 PackageInfo->cbMaxToken = 0x4000;
75 PackageInfo->Name = (LPWSTR)SCHANNEL_NAME_W;
76 PackageInfo->Comment = schannelCommentW;
78 return STATUS_SUCCESS;
81 static SECPKG_FUNCTION_TABLE secPkgFunctionTable[2] =
82 { {
83 NULL, /* InitializePackage */
84 NULL, /* LsaLogonUser */
85 NULL, /* CallPackage */
86 NULL, /* LogonTerminated */
87 NULL, /* CallPackageUntrusted */
88 NULL, /* CallPackagePassthrough */
89 NULL, /* LogonUserEx */
90 NULL, /* LogonUserEx2 */
91 NULL, /* Initialize */
92 NULL, /* Shutdown */
93 SpGetInfoUnified,
94 NULL, /* AcceptCredentials */
95 NULL, /* SpAcquireCredentialsHandle */
96 NULL, /* SpQueryCredentialsAttributes */
97 NULL, /* FreeCredentialsHandle */
98 NULL, /* SaveCredentials */
99 NULL, /* GetCredentials */
100 NULL, /* DeleteCredentials */
101 NULL, /* InitLsaModeContext */
102 NULL, /* AcceptLsaModeContext */
103 NULL, /* DeleteContext */
104 NULL, /* ApplyControlToken */
105 NULL, /* GetUserInfo */
106 NULL, /* GetExtendedInformation */
107 NULL, /* SpQueryContextAttributes */
108 NULL, /* SpAddCredentials */
109 NULL, /* SetExtendedInformation */
110 NULL, /* SetContextAttributes */
111 NULL, /* SetCredentialsAttributes */
112 NULL, /* ChangeAccountPassword */
113 NULL, /* QueryMetaData */
114 NULL, /* ExchangeMetaData */
115 NULL, /* GetCredUIContext */
116 NULL, /* UpdateCredentials */
117 NULL, /* ValidateTargetInfo */
118 }, {
119 NULL, /* InitializePackage */
120 NULL, /* LsaLogonUser */
121 NULL, /* CallPackage */
122 NULL, /* LogonTerminated */
123 NULL, /* CallPackageUntrusted */
124 NULL, /* CallPackagePassthrough */
125 NULL, /* LogonUserEx */
126 NULL, /* LogonUserEx2 */
127 NULL, /* Initialize */
128 NULL, /* Shutdown */
129 SpGetInfoSChannel,
130 NULL, /* AcceptCredentials */
131 NULL, /* SpAcquireCredentialsHandle */
132 NULL, /* SpQueryCredentialsAttributes */
133 NULL, /* FreeCredentialsHandle */
134 NULL, /* SaveCredentials */
135 NULL, /* GetCredentials */
136 NULL, /* DeleteCredentials */
137 NULL, /* InitLsaModeContext */
138 NULL, /* AcceptLsaModeContext */
139 NULL, /* DeleteContext */
140 NULL, /* ApplyControlToken */
141 NULL, /* GetUserInfo */
142 NULL, /* GetExtendedInformation */
143 NULL, /* SpQueryContextAttributes */
144 NULL, /* SpAddCredentials */
145 NULL, /* SetExtendedInformation */
146 NULL, /* SetContextAttributes */
147 NULL, /* SetCredentialsAttributes */
148 NULL, /* ChangeAccountPassword */
149 NULL, /* QueryMetaData */
150 NULL, /* ExchangeMetaData */
151 NULL, /* GetCredUIContext */
152 NULL, /* UpdateCredentials */
153 NULL, /* ValidateTargetInfo */
157 /***********************************************************************
158 * SpLsaModeInitialize (SCHANNEL.@)
160 NTSTATUS WINAPI SpLsaModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
161 PSECPKG_FUNCTION_TABLE *ppTables, PULONG pcTables)
163 TRACE("(%u, %p, %p, %p)\n", LsaVersion, PackageVersion, ppTables, pcTables);
165 *PackageVersion = SECPKG_INTERFACE_VERSION_6;
166 *pcTables = 2;
167 *ppTables = secPkgFunctionTable;
169 return STATUS_SUCCESS;