3a4da26a88501c427200e1274a11988cce3d45c2
[reactos.git] / reactos / dll / win32 / schannel / usermode.c
1 /*
2 * User-mode functions of the SChannel security provider
3 *
4 * Copyright 2007 Yuval Fledel
5 *
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.
10 *
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.
15 *
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
19 */
20
21 #include <stdarg.h>
22
23 #include <ntstatus.h>
24 #define WIN32_NO_STATUS
25 #define _INC_WINDOWS
26 #define COM_NO_WINDOWS_H
27 #include <windef.h>
28 #include <winbase.h>
29 #include <sspi.h>
30 #include <ntsecapi.h>
31 #include <ntsecpkg.h>
32
33 #include <wine/debug.h>
34
35 WINE_DEFAULT_DEBUG_CHANNEL(schannel);
36
37 static SECPKG_USER_FUNCTION_TABLE secPkgUserTables[2] =
38 { {
39 NULL, /* InstanceInit */
40 NULL, /* InitUserModeContext */
41 NULL, /* MakeSignature */
42 NULL, /* VerifySignature */
43 NULL, /* SealMessage */
44 NULL, /* UnsealMessage */
45 NULL, /* GetContextToken */
46 NULL, /* SpQueryContextAttributes */
47 NULL, /* CompleteAuthToken */
48 NULL, /* DeleteUserModeContext */
49 NULL, /* FormatCredentials */
50 NULL, /* MarshallSupplementalCreds */
51 NULL, /* ExportContext */
52 NULL, /* ImportContext */
53 }, {
54 NULL, /* InstanceInit */
55 NULL, /* InitUserModeContext */
56 NULL, /* MakeSignature */
57 NULL, /* VerifySignature */
58 NULL, /* SealMessage */
59 NULL, /* UnsealMessage */
60 NULL, /* GetContextToken */
61 NULL, /* SpQueryContextAttributes */
62 NULL, /* CompleteAuthToken */
63 NULL, /* DeleteUserModeContext */
64 NULL, /* FormatCredentials */
65 NULL, /* MarshallSupplementalCreds */
66 NULL, /* ExportContext */
67 NULL, /* ImportContext */
68 }
69 };
70
71 /***********************************************************************
72 * SpUserModeInitialize (SCHANNEL.@)
73 */
74 NTSTATUS WINAPI SpUserModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
75 PSECPKG_USER_FUNCTION_TABLE *ppTables, PULONG pcTables)
76 {
77 TRACE("(%u, %p, %p, %p)\n", LsaVersion, PackageVersion, ppTables, pcTables);
78
79 if (LsaVersion != SECPKG_INTERFACE_VERSION)
80 return STATUS_INVALID_PARAMETER;
81
82 *PackageVersion = SECPKG_INTERFACE_VERSION;
83 *pcTables = 2;
84 *ppTables = secPkgUserTables;
85
86 return STATUS_SUCCESS;
87 }