2 * secur32 private definitions.
4 * Copyright (C) 2004 Juan Lang
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 #ifndef __SECUR32_PRIV_H__
22 #define __SECUR32_PRIV_H__
24 #include <sys/types.h>
29 #include "wine/list.h"
31 typedef struct _SecureProvider
37 SecurityFunctionTableA fnTableA
;
38 SecurityFunctionTableW fnTableW
;
41 typedef struct _SecurePackage
45 SecureProvider
*provider
;
48 /* Allocates space for and initializes a new provider. If fnTableA or fnTableW
49 * is non-NULL, assumes the provider is built-in, and if moduleName is non-NULL,
50 * means must load the LSA/user mode functions tables from external SSP/AP module.
51 * Otherwise moduleName must not be NULL.
52 * Returns a pointer to the stored provider entry, for use adding packages.
54 SecureProvider
*SECUR32_addProvider(const SecurityFunctionTableA
*fnTableA
,
55 const SecurityFunctionTableW
*fnTableW
, PCWSTR moduleName
) DECLSPEC_HIDDEN
;
57 /* Allocates space for and adds toAdd packages with the given provider.
58 * provider must not be NULL, and either infoA or infoW may be NULL, but not
61 void SECUR32_addPackages(SecureProvider
*provider
, ULONG toAdd
,
62 const SecPkgInfoA
*infoA
, const SecPkgInfoW
*infoW
) DECLSPEC_HIDDEN
;
64 /* Tries to find the package named packageName. If it finds it, implicitly
65 * loads the package if it isn't already loaded.
67 SecurePackage
*SECUR32_findPackageW(PCWSTR packageName
) DECLSPEC_HIDDEN
;
69 /* Tries to find the package named packageName. (Thunks to _findPackageW)
71 SecurePackage
*SECUR32_findPackageA(PCSTR packageName
) DECLSPEC_HIDDEN
;
73 /* Initialization functions for built-in providers */
74 void SECUR32_initSchannelSP(void) DECLSPEC_HIDDEN
;
75 void load_auth_packages(void) DECLSPEC_HIDDEN
;
76 NTSTATUS NTAPI
nego_SpLsaModeInitialize(ULONG
, PULONG
, PSECPKG_FUNCTION_TABLE
*, PULONG
) DECLSPEC_HIDDEN
;
77 NTSTATUS NTAPI
nego_SpUserModeInitialize(ULONG
, PULONG
, PSECPKG_USER_FUNCTION_TABLE
*, PULONG
) DECLSPEC_HIDDEN
;
78 SECPKG_FUNCTION_TABLE
*lsa_find_package(const char *name
, SECPKG_USER_FUNCTION_TABLE
**user_api
) DECLSPEC_HIDDEN
;
80 /* Cleanup functions for built-in providers */
81 void SECUR32_deinitSchannelSP(void) DECLSPEC_HIDDEN
;
83 /* schannel internal interface */
84 typedef UINT64 schan_session
;
86 typedef struct schan_credentials
89 DWORD enabled_protocols
;
95 schan_session session
;
98 struct allocate_certificate_credentials_params
100 schan_credentials
*c
;
108 struct create_session_params
110 schan_credentials
*cred
;
111 schan_session
*session
;
114 struct free_certificate_credentials_params
116 schan_credentials
*c
;
119 struct get_application_protocol_params
121 schan_session session
;
122 SecPkgContext_ApplicationProtocol
*protocol
;
125 struct get_connection_info_params
127 schan_session session
;
128 SecPkgContext_ConnectionInfo
*info
;
131 struct get_cipher_info_params
133 schan_session session
;
134 SecPkgContext_CipherInfo
*info
;
137 struct get_session_peer_certificate_params
139 schan_session session
;
140 BYTE
*buffer
; /* Starts with array of ULONG sizes, followed by contiguous data blob. */
145 struct get_unique_channel_binding_params
147 schan_session session
;
155 CONTROL_TOKEN_SHUTDOWN
,
159 struct handshake_params
161 schan_session session
;
162 SecBufferDesc
*input
;
164 SecBufferDesc
*output
;
166 int *output_buffer_idx
;
167 ULONG
*output_offset
;
168 enum control_token control_token
;
169 unsigned int alert_type
;
170 unsigned int alert_number
;
175 schan_session session
;
176 SecBufferDesc
*input
;
184 schan_session session
;
185 SecBufferDesc
*output
;
188 int *output_buffer_idx
;
189 ULONG
*output_offset
;
192 struct set_application_protocols_params
194 schan_session session
;
195 unsigned char *buffer
;
199 struct set_dtls_mtu_params
201 schan_session session
;
205 struct set_session_target_params
207 schan_session session
;
211 struct set_dtls_timeouts_params
213 schan_session session
;
214 unsigned int retrans_timeout
;
215 unsigned int total_timeout
;
222 unix_allocate_certificate_credentials
,
224 unix_dispose_session
,
225 unix_free_certificate_credentials
,
226 unix_get_application_protocol
,
227 unix_get_cipher_info
,
228 unix_get_connection_info
,
229 unix_get_enabled_protocols
,
230 unix_get_key_signature_algorithm
,
231 unix_get_max_message_size
,
232 unix_get_session_cipher_block_size
,
233 unix_get_session_peer_certificate
,
234 unix_get_unique_channel_binding
,
238 unix_set_application_protocols
,
240 unix_set_session_target
,
241 unix_set_dtls_timeouts
,
244 #endif /* __SECUR32_PRIV_H__ */