Juan Lang | 3ed89c3 | 2004-03-02 04:57:35 +0000 | [diff] [blame] | 1 | /* Copyright (C) 2004 Juan Lang |
| 2 | * |
| 3 | * This file defines thunks between wide char and multibyte functions for |
| 4 | * SSPs that only provide one or the other. |
| 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ |
| 20 | |
| 21 | #ifndef __SECUR32_THUNKS_H__ |
| 22 | #define __SECUR32_THUNKS_H__ |
| 23 | |
| 24 | /* Prototypes for functions that thunk between wide char and multibyte versions, |
| 25 | * for SSPs that only provide one or the other. |
| 26 | */ |
| 27 | SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleA( |
| 28 | SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, ULONG fCredentialsUse, |
| 29 | PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, |
| 30 | PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry); |
| 31 | SECURITY_STATUS SEC_ENTRY thunk_AcquireCredentialsHandleW( |
| 32 | SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, ULONG fCredentialsUse, |
| 33 | PLUID pvLogonID, PVOID pAuthData, SEC_GET_KEY_FN pGetKeyFn, |
| 34 | PVOID pvGetKeyArgument, PCredHandle phCredential, PTimeStamp ptsExpiry); |
| 35 | SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextA( |
| 36 | PCredHandle phCredential, PCtxtHandle phContext, |
| 37 | SEC_CHAR *pszTargetName, unsigned long fContextReq, |
| 38 | unsigned long Reserved1, unsigned long TargetDataRep, PSecBufferDesc pInput, |
| 39 | unsigned long Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, |
| 40 | unsigned long *pfContextAttr, PTimeStamp ptsExpiry); |
| 41 | SECURITY_STATUS SEC_ENTRY thunk_InitializeSecurityContextW( |
| 42 | PCredHandle phCredential, PCtxtHandle phContext, |
| 43 | SEC_WCHAR *pszTargetName, unsigned long fContextReq, |
| 44 | unsigned long Reserved1, unsigned long TargetDataRep, PSecBufferDesc pInput, |
| 45 | unsigned long Reserved2, PCtxtHandle phNewContext, PSecBufferDesc pOutput, |
| 46 | unsigned long *pfContextAttr, PTimeStamp ptsExpiry); |
| 47 | SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextA( |
| 48 | SEC_CHAR *pszPackage, PSecBuffer pPackedContext, void *Token, |
| 49 | PCtxtHandle phContext); |
| 50 | SECURITY_STATUS SEC_ENTRY thunk_ImportSecurityContextW( |
| 51 | SEC_WCHAR *pszPackage, PSecBuffer pPackedContext, void *Token, |
| 52 | PCtxtHandle phContext); |
| 53 | SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsA(PCredHandle hCredentials, |
| 54 | SEC_CHAR *pszPrincipal, SEC_CHAR *pszPackage, unsigned long fCredentialUse, |
| 55 | void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, |
| 56 | PTimeStamp ptsExpiry); |
| 57 | SECURITY_STATUS SEC_ENTRY thunk_AddCredentialsW(PCredHandle hCredentials, |
| 58 | SEC_WCHAR *pszPrincipal, SEC_WCHAR *pszPackage, unsigned long fCredentialUse, |
| 59 | void *pAuthData, SEC_GET_KEY_FN pGetKeyFn, void *pvGetKeyArgument, |
| 60 | PTimeStamp ptsExpiry); |
| 61 | SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesA( |
| 62 | PCredHandle phCredential, unsigned long ulAttribute, void *pBuffer); |
| 63 | SECURITY_STATUS SEC_ENTRY thunk_QueryCredentialsAttributesW( |
| 64 | PCredHandle phCredential, unsigned long ulAttribute, void *pBuffer); |
| 65 | SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesA( |
| 66 | PCtxtHandle phContext, unsigned long ulAttribute, void *pBuffer); |
| 67 | SECURITY_STATUS SEC_ENTRY thunk_QueryContextAttributesW( |
| 68 | PCtxtHandle phContext, unsigned long ulAttribute, void *pBuffer); |
| 69 | SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesA(PCtxtHandle phContext, |
| 70 | unsigned long ulAttribute, void *pBuffer, unsigned long cbBuffer); |
| 71 | SECURITY_STATUS SEC_ENTRY thunk_SetContextAttributesW(PCtxtHandle phContext, |
| 72 | unsigned long ulAttribute, void *pBuffer, unsigned long cbBuffer); |
| 73 | |
| 74 | #endif /* ndef __SECUR32_THUNKS_H__ */ |