thunks.h 3.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/* Copyright (C) 2004 Juan Lang
 *
 * This file defines thunks between wide char and multibyte functions for
 * SSPs that only provide one or the other.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * 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 22 23 24 25 26 27 28 29
 */

#ifndef __SECUR32_THUNKS_H__
#define __SECUR32_THUNKS_H__

/* Prototypes for functions that thunk between wide char and multibyte versions,
 * for SSPs that only provide one or the other.
 */
SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA(
 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse,
 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
30
 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN;
31 32 33
SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW(
 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse,
 PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn,
34
 PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN;
35 36
SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA(
 PCredHandle phCredential, PCtxtHandle phContext,
37 38 39
 SEC_CHAR *pszTargetName, ULONG fContextReq,
 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
40
 ULONG *pfContextAttr, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN;
41 42
SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW(
 PCredHandle phCredential, PCtxtHandle phContext,
43 44 45
 SEC_WCHAR *pszTargetName, ULONG fContextReq,
 ULONG Reserved1, ULONG TargetDataRep, PSecBufferDesc pInput,
 ULONG Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput,
46
 ULONG *pfContextAttr, PTimeStamp ptsExpiry) DECLSPEC_HIDDEN;
47 48
SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA(
 SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token,
49
 PCtxtHandle phContext) DECLSPEC_HIDDEN;
50 51
SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW(
 SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token,
52
 PCtxtHandle phContext) DECLSPEC_HIDDEN;
53
SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA(PCredHandle hCredentials,
54
 SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialUse,
55
 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
56
 PTimeStamp ptsExpiry) DECLSPEC_HIDDEN;
57
SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW(PCredHandle hCredentials,
58
 SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialUse,
59
 void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument,
60
 PTimeStamp ptsExpiry) DECLSPEC_HIDDEN;
61
SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA(
62
 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN;
63
SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW(
64
 PCredHandle phCredential, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN;
65
SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA(
66
 PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN;
67
SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW(
68
 PCtxtHandle phContext, ULONG ulAttribute, void *pBuffer) DECLSPEC_HIDDEN;
69
SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA(PCtxtHandle phContext,
70
 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) DECLSPEC_HIDDEN;
71
SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW(PCtxtHandle phContext,
72
 ULONG ulAttribute, void *pBuffer, ULONG cbBuffer) DECLSPEC_HIDDEN;
73 74

#endif /* ndef __SECUR32_THUNKS_H__ */