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 __SECUR32_PRIV_H__ 22 #define __SECUR32_PRIV_H__ 23 24 #include <wine/list.h> 25 26 typedef struct _SecureProvider 27 { 28 struct list entry; 29 BOOL loaded; 30 PWSTR moduleName; 31 HMODULE lib; 32 SecurityFunctionTableA fnTableA; 33 SecurityFunctionTableW fnTableW; 34 } SecureProvider; 35 36 typedef struct _SecurePackage 37 { 38 struct list entry; 39 SecPkgInfoW infoW; 40 SecureProvider *provider; 41 } SecurePackage; 42 43 /* Allocates space for and initializes a new provider. If fnTableA or fnTableW 44 * is non-NULL, assumes the provider is built-in, and if moduleName is non-NULL, 45 * means must load the LSA/user mode functions tables from external SSP/AP module. 46 * Otherwise moduleName must not be NULL. 47 * Returns a pointer to the stored provider entry, for use adding packages. 48 */ 49 SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA, 50 const SecurityFunctionTableW *fnTableW, PCWSTR moduleName) DECLSPEC_HIDDEN; 51 52 /* Allocates space for and adds toAdd packages with the given provider. 53 * provider must not be NULL, and either infoA or infoW may be NULL, but not 54 * both. 55 */ 56 void SECUR32_addPackages(SecureProvider *provider, ULONG toAdd, 57 const SecPkgInfoA *infoA, const SecPkgInfoW *infoW) DECLSPEC_HIDDEN; 58 59 #include "wine/wine_supp.h" 60 61 /* Tries to find the package named packageName. If it finds it, implicitly 62 * loads the package if it isn't already loaded. 63 */ 64 SecurePackage *SECUR32_findPackageW(PCWSTR packageName) DECLSPEC_HIDDEN; 65 66 /* Tries to find the package named packageName. (Thunks to _findPackageW) 67 */ 68 SecurePackage *SECUR32_findPackageA(PCSTR packageName) DECLSPEC_HIDDEN; 69 70 /* A few string helpers; will return NULL if str is NULL. Free return with 71 * HeapFree */ 72 PWSTR SECUR32_AllocWideFromMultiByte(PCSTR str) DECLSPEC_HIDDEN; 73 PSTR SECUR32_AllocMultiByteFromWide(PCWSTR str) DECLSPEC_HIDDEN; 74 75 #endif /* ndef __SECUR32_PRIV_H__ */ 76