d2d1: Implement ID2D1DeviceContext::CreateImageBrush().
[wine.git] / dlls / secur32 / secur32_priv.h
blob64edc0581d64586cc60e92d49103a3764b02c358
1 /*
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>
25 #include <limits.h>
26 #include "schannel.h"
27 #include "wine/list.h"
29 extern HINSTANCE hsecur32 DECLSPEC_HIDDEN;
31 typedef struct _SecureProvider
33 struct list entry;
34 BOOL loaded;
35 PWSTR moduleName;
36 HMODULE lib;
37 SecurityFunctionTableA fnTableA;
38 SecurityFunctionTableW fnTableW;
39 } SecureProvider;
41 typedef struct _SecurePackage
43 struct list entry;
44 SecPkgInfoW infoW;
45 SecureProvider *provider;
46 } SecurePackage;
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
59 * both.
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
86 ULONG credential_use;
87 void *credentials;
88 DWORD enabled_protocols;
89 } schan_credentials;
91 struct schan_transport;
93 struct schan_buffers
95 SIZE_T offset;
96 SIZE_T limit;
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;
149 CERT_BLOB *certs;
150 ULONG *bufsize;
151 ULONG *retcount;
154 struct get_unique_channel_binding_params
156 schan_session session;
157 void *buffer;
158 ULONG *bufsize;
161 struct handshake_params
163 schan_session session;
164 SecBufferDesc *input;
165 SIZE_T input_size;
166 SecBufferDesc *output;
167 SecBuffer *alloc_buffer;
170 struct recv_params
172 schan_session session;
173 SecBufferDesc *input;
174 SIZE_T input_size;
175 void *buffer;
176 SIZE_T *length;
179 struct send_params
181 schan_session session;
182 SecBufferDesc *output;
183 const void *buffer;
184 SIZE_T *length;
187 struct set_application_protocols_params
189 schan_session session;
190 unsigned char *buffer;
191 unsigned int buflen;
194 struct set_dtls_mtu_params
196 schan_session session;
197 unsigned int mtu;
200 struct set_session_target_params
202 schan_session session;
203 const char *target;
206 struct set_dtls_timeouts_params
208 schan_session session;
209 unsigned int retrans_timeout;
210 unsigned int total_timeout;
213 enum schan_funcs
215 unix_process_attach,
216 unix_process_detach,
217 unix_allocate_certificate_credentials,
218 unix_create_session,
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,
229 unix_handshake,
230 unix_recv,
231 unix_send,
232 unix_set_application_protocols,
233 unix_set_dtls_mtu,
234 unix_set_session_target,
235 unix_set_dtls_timeouts,
238 #endif /* __SECUR32_PRIV_H__ */