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>
27 #include "wine/list.h"
29 typedef struct _SecureProvider
35 SecurityFunctionTableA fnTableA
;
36 SecurityFunctionTableW fnTableW
;
39 typedef struct _SecurePackage
43 SecureProvider
*provider
;
46 /* Allocates space for and initializes a new provider. If fnTableA or fnTableW
47 * is non-NULL, assumes the provider is built-in, and if moduleName is non-NULL,
48 * means must load the LSA/user mode functions tables from external SSP/AP module.
49 * Otherwise moduleName must not be NULL.
50 * Returns a pointer to the stored provider entry, for use adding packages.
52 SecureProvider
*SECUR32_addProvider(const SecurityFunctionTableA
*fnTableA
,
53 const SecurityFunctionTableW
*fnTableW
, PCWSTR moduleName
) DECLSPEC_HIDDEN
;
55 /* Allocates space for and adds toAdd packages with the given provider.
56 * provider must not be NULL, and either infoA or infoW may be NULL, but not
59 void SECUR32_addPackages(SecureProvider
*provider
, ULONG toAdd
,
60 const SecPkgInfoA
*infoA
, const SecPkgInfoW
*infoW
) DECLSPEC_HIDDEN
;
62 /* Tries to find the package named packageName. If it finds it, implicitly
63 * loads the package if it isn't already loaded.
65 SecurePackage
*SECUR32_findPackageW(PCWSTR packageName
) DECLSPEC_HIDDEN
;
67 /* Tries to find the package named packageName. (Thunks to _findPackageW)
69 SecurePackage
*SECUR32_findPackageA(PCSTR packageName
) DECLSPEC_HIDDEN
;
71 /* Initialization functions for built-in providers */
72 void SECUR32_initSchannelSP(void) DECLSPEC_HIDDEN
;
73 void SECUR32_initNegotiateSP(void) DECLSPEC_HIDDEN
;
74 void load_auth_packages(void) DECLSPEC_HIDDEN
;
76 /* Cleanup functions for built-in providers */
77 void SECUR32_deinitSchannelSP(void) DECLSPEC_HIDDEN
;
79 /* schannel internal interface */
80 typedef UINT64 schan_session
;
82 typedef struct schan_credentials
85 DWORD enabled_protocols
;
91 schan_session session
;
94 struct allocate_certificate_credentials_params
104 struct create_session_params
106 schan_credentials
*cred
;
107 schan_session
*session
;
110 struct free_certificate_credentials_params
112 schan_credentials
*c
;
115 struct get_application_protocol_params
117 schan_session session
;
118 SecPkgContext_ApplicationProtocol
*protocol
;
121 struct get_connection_info_params
123 schan_session session
;
124 SecPkgContext_ConnectionInfo
*info
;
127 struct get_cipher_info_params
129 schan_session session
;
130 SecPkgContext_CipherInfo
*info
;
133 struct get_session_peer_certificate_params
135 schan_session session
;
136 BYTE
*buffer
; /* Starts with array of ULONG sizes, followed by contiguous data blob. */
141 struct get_unique_channel_binding_params
143 schan_session session
;
151 control_token_shutdown
,
154 struct handshake_params
156 schan_session session
;
157 SecBufferDesc
*input
;
159 SecBufferDesc
*output
;
161 int *output_buffer_idx
;
162 ULONG
*output_offset
;
163 enum control_token control_token
;
168 schan_session session
;
169 SecBufferDesc
*input
;
177 schan_session session
;
178 SecBufferDesc
*output
;
181 int *output_buffer_idx
;
182 ULONG
*output_offset
;
185 struct set_application_protocols_params
187 schan_session session
;
188 unsigned char *buffer
;
192 struct set_dtls_mtu_params
194 schan_session session
;
198 struct set_session_target_params
200 schan_session session
;
204 struct set_dtls_timeouts_params
206 schan_session session
;
207 unsigned int retrans_timeout
;
208 unsigned int total_timeout
;
215 unix_allocate_certificate_credentials
,
217 unix_dispose_session
,
218 unix_free_certificate_credentials
,
219 unix_get_application_protocol
,
220 unix_get_cipher_info
,
221 unix_get_connection_info
,
222 unix_get_enabled_protocols
,
223 unix_get_key_signature_algorithm
,
224 unix_get_max_message_size
,
225 unix_get_session_cipher_block_size
,
226 unix_get_session_peer_certificate
,
227 unix_get_unique_channel_binding
,
231 unix_set_application_protocols
,
233 unix_set_session_target
,
234 unix_set_dtls_timeouts
,
237 #endif /* __SECUR32_PRIV_H__ */