ReactOS  0.4.14-dev-317-g96040ec
schannel_priv.h
Go to the documentation of this file.
1 /*
2  * secur32 private definitions.
3  *
4  * Copyright (C) 2004 Juan Lang
5  *
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.
10  *
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.
15  *
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
19  */
20 
21 #ifndef __SCHANNEL_PRIV_H__
22 #define __SCHANNEL_PRIV_H__
23 
24 typedef struct _SecureProvider
25 {
26  struct list entry;
31 
32 typedef struct _SecurePackage
33 {
34  struct list entry;
38 
39 /* Allocates space for and initializes a new provider. If fnTableA or fnTableW
40  * is non-NULL, assumes the provider is built-in, and if moduleName is non-NULL,
41  * means must load the LSA/user mode functions tables from external SSP/AP module.
42  * Otherwise moduleName must not be NULL.
43  * Returns a pointer to the stored provider entry, for use adding packages.
44  */
46  const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) DECLSPEC_HIDDEN;
47 
48 /* Allocates space for and adds toAdd packages with the given provider.
49  * provider must not be NULL, and either infoA or infoW may be NULL, but not
50  * both.
51  */
52 void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd,
54 
55 /* Initialization functions for built-in providers */
57 
58 /* schannel internal interface */
59 typedef struct schan_imp_session_opaque *schan_imp_session;
60 
61 typedef struct schan_credentials
62 {
64  void *credentials;
67 
68 struct schan_transport;
69 
71 {
77  int (*get_next_buffer)(const struct schan_transport *, struct schan_buffers *);
78 };
79 
81 {
82  struct schan_context *ctx;
83  struct schan_buffers in;
85 };
86 
88 extern int schan_pull(struct schan_transport *t, void *buff, size_t *buff_len) DECLSPEC_HIDDEN;
89 extern int schan_push(struct schan_transport *t, const void *buff, size_t *buff_len) DECLSPEC_HIDDEN;
90 
92 
93 /* schannel implementation interface */
106 extern SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer,
113 extern BOOL schan_imp_init(void) DECLSPEC_HIDDEN;
114 extern void schan_imp_deinit(void) DECLSPEC_HIDDEN;
115 
117 WINAPI
119  PVOID pvoid
120  );
122  PSecPkgInfoA *ppPackageInfo);
124  PSecPkgInfoW *ppPackageInfo);
127 
128 #endif /* ndef __SCHANNEL_PRIV_H__ */
129 
130 
unsigned int schan_imp_get_session_cipher_block_size(schan_imp_session session) DECLSPEC_HIDDEN
const uint16_t * PCWSTR
Definition: typedefs.h:55
void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, const SecPkgInfoA *infoA, const SecPkgInfoW *infoW) DECLSPEC_HIDDEN
Definition: secur32_wine.c:362
struct schan_buffers out
Definition: schannel_priv.h:84
SecurityFunctionTableW schanTableW
SECURITY_STATUS schan_imp_send(schan_imp_session session, const void *buffer, SIZE_T *length) DECLSPEC_HIDDEN
SECURITY_STATUS WINAPI schan_EnumerateSecurityPackagesA(PULONG pcPackages, PSecPkgInfoA *ppPackageInfo)
Definition: secur32_wine.c:199
int schan_pull(struct schan_transport *t, void *buff, size_t *buff_len) DECLSPEC_HIDDEN
uint16_t * PWSTR
Definition: typedefs.h:54
struct list entry
Definition: schannel_priv.h:34
GLuint GLuint GLsizei count
Definition: gl.h:1545
static const SecPkgInfoA infoA
Definition: kerberos.c:302
struct schan_context * ctx
Definition: schannel_priv.h:82
int current_buffer_idx
Definition: schannel_priv.h:75
GLdouble GLdouble t
Definition: gl.h:2047
BOOL allow_buffer_resize
Definition: schannel_priv.h:76
void schan_imp_deinit(void) DECLSPEC_HIDDEN
GLuint buffer
Definition: glext.h:5915
SecureProvider * SECUR32_addProvider(const SecurityFunctionTableA *fnTableA, const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) DECLSPEC_HIDDEN
Definition: secur32_wine.c:314
char * schan_get_buffer(const struct schan_transport *t, struct schan_buffers *s, SIZE_T *count) DECLSPEC_HIDDEN
struct list entry
Definition: schannel_priv.h:26
unsigned int BOOL
Definition: ntddk_ex.h:94
struct schan_imp_session_opaque * schan_imp_session
Definition: schannel_priv.h:59
struct _SecureProvider SecureProvider
void schan_imp_set_session_transport(schan_imp_session session, struct schan_transport *t) DECLSPEC_HIDDEN
const SecBufferDesc * desc
Definition: schannel_priv.h:74
static BYTE cert[]
Definition: msg.c:1437
SECURITY_STATUS schan_imp_handshake(schan_imp_session session) DECLSPEC_HIDDEN
SECURITY_STATUS WINAPI schan_EnumerateSecurityPackagesW(PULONG pcPackages, PSecPkgInfoW *ppPackageInfo)
Definition: secur32_wine.c:58
void SECUR32_initSchannelSP(void) DECLSPEC_HIDDEN
LONG SECURITY_STATUS
Definition: sspi.h:34
BOOL schan_imp_create_session(schan_imp_session *session, schan_credentials *cred) DECLSPEC_HIDDEN
BOOL schan_imp_allocate_certificate_credentials(schan_credentials *) DECLSPEC_HIDDEN
static const SecPkgInfoW infoW
Definition: kerberos.c:293
void schan_imp_dispose_session(schan_imp_session session) DECLSPEC_HIDDEN
schan_imp_session schan_session_for_transport(struct schan_transport *t) DECLSPEC_HIDDEN
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
SecurityFunctionTableA schanTableA
SECURITY_STATUS WINAPI schan_FreeContextBuffer(PVOID pvoid)
Definition: secur32_wine.c:221
#define WINAPI
Definition: msvc.h:8
unsigned long DWORD
Definition: ntddk_ex.h:95
GLdouble s
Definition: gl.h:2039
Definition: _list.h:228
void schan_imp_set_session_target(schan_imp_session session, const char *target) DECLSPEC_HIDDEN
void schan_imp_free_certificate_credentials(schan_credentials *) DECLSPEC_HIDDEN
SECURITY_STATUS schan_imp_get_connection_info(schan_imp_session session, SecPkgContext_ConnectionInfo *info) DECLSPEC_HIDDEN
int schan_push(struct schan_transport *t, const void *buff, size_t *buff_len) DECLSPEC_HIDDEN
ULONG_PTR SIZE_T
Definition: typedefs.h:78
SecureProvider * provider
Definition: schannel_priv.h:36
#define DECLSPEC_HIDDEN
Definition: precomp.h:8
GLuint in
Definition: glext.h:9616
struct _SecurePackage SecurePackage
unsigned int * PULONG
Definition: retypes.h:1
SECURITY_STATUS schan_imp_get_session_peer_certificate(schan_imp_session session, HCERTSTORE, PCCERT_CONTEXT *cert) DECLSPEC_HIDDEN
unsigned int schan_imp_get_max_message_size(schan_imp_session session) DECLSPEC_HIDDEN
BOOL schan_imp_init(void) DECLSPEC_HIDDEN
unsigned int ULONG
Definition: retypes.h:1
GLenum target
Definition: glext.h:7315
SecPkgInfoW infoW
Definition: schannel_priv.h:35
DWORD schan_imp_enabled_protocols(void) DECLSPEC_HIDDEN
struct schan_credentials schan_credentials
static unsigned char buff[32768]
Definition: fatten.c:17
SECURITY_STATUS schan_imp_recv(schan_imp_session session, void *buffer, SIZE_T *length) DECLSPEC_HIDDEN
int(* get_next_buffer)(const struct schan_transport *, struct schan_buffers *)
Definition: schannel_priv.h:77
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31