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
24 #define WIN32_NO_STATUS
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(schannel
);
36 /***********************************************************************
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 /***********************************************************************
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] =
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 */
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 NULL
, /* PostLogonUser */
119 NULL
, /* GetRemoteCredGuardLogonBuffer */
120 NULL
, /* GetRemoteCredGuardSupplementalCreds */
122 NULL
, /* InitializePackage */
123 NULL
, /* LsaLogonUser */
124 NULL
, /* CallPackage */
125 NULL
, /* LogonTerminated */
126 NULL
, /* CallPackageUntrusted */
127 NULL
, /* CallPackagePassthrough */
128 NULL
, /* LogonUserEx */
129 NULL
, /* LogonUserEx2 */
130 NULL
, /* Initialize */
133 NULL
, /* AcceptCredentials */
134 NULL
, /* SpAcquireCredentialsHandle */
135 NULL
, /* SpQueryCredentialsAttributes */
136 NULL
, /* FreeCredentialsHandle */
137 NULL
, /* SaveCredentials */
138 NULL
, /* GetCredentials */
139 NULL
, /* DeleteCredentials */
140 NULL
, /* InitLsaModeContext */
141 NULL
, /* AcceptLsaModeContext */
142 NULL
, /* DeleteContext */
143 NULL
, /* ApplyControlToken */
144 NULL
, /* GetUserInfo */
145 NULL
, /* GetExtendedInformation */
146 NULL
, /* SpQueryContextAttributes */
147 NULL
, /* SpAddCredentials */
148 NULL
, /* SetExtendedInformation */
149 NULL
, /* SetContextAttributes */
150 NULL
, /* SetCredentialsAttributes */
151 NULL
, /* ChangeAccountPassword */
152 NULL
, /* QueryMetaData */
153 NULL
, /* ExchangeMetaData */
154 NULL
, /* GetCredUIContext */
155 NULL
, /* UpdateCredentials */
156 NULL
, /* ValidateTargetInfo */
157 NULL
, /* PostLogonUser */
158 NULL
, /* GetRemoteCredGuardLogonBuffer */
159 NULL
, /* GetRemoteCredGuardSupplementalCreds */
163 /***********************************************************************
164 * SpLsaModeInitialize (SCHANNEL.@)
166 NTSTATUS WINAPI
SpLsaModeInitialize(ULONG LsaVersion
, PULONG PackageVersion
,
167 PSECPKG_FUNCTION_TABLE
*ppTables
, PULONG pcTables
)
169 TRACE("(%u, %p, %p, %p)\n", LsaVersion
, PackageVersion
, ppTables
, pcTables
);
171 *PackageVersion
= SECPKG_INTERFACE_VERSION_8
;
173 *ppTables
= secPkgFunctionTable
;
175 return STATUS_SUCCESS
;