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 extern HINSTANCE hsecur32 DECLSPEC_HIDDEN
;
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 SECUR32_initNegotiateSP(void) DECLSPEC_HIDDEN
;
76 void load_auth_packages(void) DECLSPEC_HIDDEN
;
78 /* Cleanup functions for built-in providers */
79 void SECUR32_deinitSchannelSP(void) DECLSPEC_HIDDEN
;
81 /* schannel internal interface */
82 typedef struct schan_session_opaque
*schan_session
;
84 typedef struct schan_credentials
88 DWORD enabled_protocols
;
91 struct schan_transport
;
97 const SecBufferDesc
*desc
;
98 SecBuffer
*alloc_buffer
;
99 int current_buffer_idx
;
100 int (*get_next_buffer
)(const struct schan_transport
*, struct schan_buffers
*);
103 struct schan_transport
105 struct schan_context
*ctx
;
106 schan_session session
;
107 struct schan_buffers in
;
108 struct schan_buffers out
;
111 struct session_params
113 schan_session session
;
116 struct allocate_certificate_credentials_params
118 schan_credentials
*c
;
119 const CERT_CONTEXT
*ctx
;
120 const DATA_BLOB
*key_blob
;
123 struct create_session_params
125 struct schan_transport
*transport
;
126 schan_credentials
*cred
;
129 struct free_certificate_credentials_params
131 schan_credentials
*c
;
134 struct get_application_protocol_params
136 schan_session session
;
137 SecPkgContext_ApplicationProtocol
*protocol
;
140 struct get_connection_info_params
142 schan_session session
;
143 SecPkgContext_ConnectionInfo
*info
;
146 struct get_session_peer_certificate_params
148 schan_session session
;
154 struct get_unique_channel_binding_params
156 schan_session session
;
161 struct handshake_params
163 schan_session session
;
164 SecBufferDesc
*input
;
166 SecBufferDesc
*output
;
167 SecBuffer
*alloc_buffer
;
172 schan_session session
;
173 SecBufferDesc
*input
;
181 schan_session session
;
182 SecBufferDesc
*output
;
187 struct set_application_protocols_params
189 schan_session session
;
190 unsigned char *buffer
;
194 struct set_dtls_mtu_params
196 schan_session session
;
200 struct set_session_target_params
202 schan_session session
;
206 struct set_dtls_timeouts_params
208 schan_session session
;
209 unsigned int retrans_timeout
;
210 unsigned int total_timeout
;
217 unix_allocate_certificate_credentials
,
219 unix_dispose_session
,
220 unix_free_certificate_credentials
,
221 unix_get_application_protocol
,
222 unix_get_connection_info
,
223 unix_get_enabled_protocols
,
224 unix_get_key_signature_algorithm
,
225 unix_get_max_message_size
,
226 unix_get_session_cipher_block_size
,
227 unix_get_session_peer_certificate
,
228 unix_get_unique_channel_binding
,
232 unix_set_application_protocols
,
234 unix_set_session_target
,
235 unix_set_dtls_timeouts
,
238 #endif /* __SECUR32_PRIV_H__ */