xref: /reactos/dll/win32/schannel/usermode.c (revision 84ccccab)
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 "precomp.h"
22 
23 static SECPKG_USER_FUNCTION_TABLE secPkgUserTables[2] =
24 { {
25     NULL, /* InstanceInit */
26     NULL, /* InitUserModeContext */
27     NULL, /* MakeSignature */
28     NULL, /* VerifySignature */
29     NULL, /* SealMessage */
30     NULL, /* UnsealMessage */
31     NULL, /* GetContextToken */
32     NULL, /* SpQueryContextAttributes */
33     NULL, /* CompleteAuthToken */
34     NULL, /* DeleteUserModeContext */
35     NULL, /* FormatCredentials */
36     NULL, /* MarshallSupplementalCreds */
37     NULL, /* ExportContext */
38     NULL, /* ImportContext */
39   }, {
40     NULL, /* InstanceInit */
41     NULL, /* InitUserModeContext */
42     NULL, /* MakeSignature */
43     NULL, /* VerifySignature */
44     NULL, /* SealMessage */
45     NULL, /* UnsealMessage */
46     NULL, /* GetContextToken */
47     NULL, /* SpQueryContextAttributes */
48     NULL, /* CompleteAuthToken */
49     NULL, /* DeleteUserModeContext */
50     NULL, /* FormatCredentials */
51     NULL, /* MarshallSupplementalCreds */
52     NULL, /* ExportContext */
53     NULL, /* ImportContext */
54   }
55 };
56 
57 /***********************************************************************
58  *              SpUserModeInitialize (SCHANNEL.@)
59  */
60 NTSTATUS WINAPI SpUserModeInitialize(ULONG LsaVersion, PULONG PackageVersion,
61   PSECPKG_USER_FUNCTION_TABLE *ppTables, PULONG pcTables)
62 {
63     TRACE("(%u, %p, %p, %p)\n", LsaVersion, PackageVersion, ppTables, pcTables);
64 
65     if (LsaVersion != SECPKG_INTERFACE_VERSION)
66         return STATUS_INVALID_PARAMETER;
67 
68     *PackageVersion = SECPKG_INTERFACE_VERSION;
69     *pcTables = 2;
70     *ppTables = secPkgUserTables;
71 
72     return STATUS_SUCCESS;
73 }
74