Changeset 21896 for branches/gcc-kmk/src
- Timestamp:
- Dec 15, 2011, 3:37:23 PM (14 years ago)
- Location:
- branches/gcc-kmk/src
- Files:
-
- 4 added
- 13 edited
- 4 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/gcc-kmk/src/Makefile.kmk
r21895 r21896 62 62 include $(PATH_SUB_CURRENT)/quartz/Makefile.kmk 63 63 include $(PATH_SUB_CURRENT)/rasapi32/Makefile.kmk 64 include $(PATH_SUB_CURRENT)/riched32/Makefile.kmk 65 include $(PATH_SUB_CURRENT)/rsaenh/Makefile.kmk 66 include $(PATH_SUB_CURRENT)/secur32/Makefile.kmk 67 include $(PATH_SUB_CURRENT)/schannel/Makefile.kmk 64 68 65 69 include $(FILE_KBUILD_SUB_FOOTER) -
branches/gcc-kmk/src/riched32/charlist.c
r21308 r21896 34 34 35 35 #ifdef __WIN32OS2__ /* no useful trace in this file! */ 36 #undef TRACE 36 37 #define TRACE(a) do {} while (0) 37 38 #endif -
branches/gcc-kmk/src/riched32/initterm.cpp
r21842 r21896 1 /* $Id: init riched32.cpp,v 1.5 2003-01-07 13:21:55 sandervlExp $ */1 /* $Id: initterm.cpp,v 1.6 2001-09-05 13:37:19 bird Exp $ */ 2 2 /* 3 * DLL entry point3 * RICHED32 DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen 6 6 * Copyright 1998 Peter Fitzsimmons 7 7 * 8 *9 8 * Project Odin Software License can be found in LICENSE.TXT 10 *11 9 */ 12 10 13 /*-------------------------------------------------------------*/14 /* INITERM.C -- Source for a custom dynamic link library */15 /* initialization and termination (_DLL_InitTerm) */16 /* function. */17 /* */18 /* When called to perform initialization, this sample function */19 /* gets storage for an array of integers, and initializes its */20 /* elements with random integers. At termination time, it */21 /* frees the array. Substitute your own special processing. */22 /*-------------------------------------------------------------*/23 24 25 /* Include files */26 11 #define INCL_DOSMODULEMGR 27 12 #define INCL_DOSPROCESS … … 37 22 #include <initdll.h> 38 23 39 extern "C" { 40 //Win32 resource table (produced by wrc) 24 // Win32 resource table (produced by wrc) 41 25 extern DWORD riched32_PEResTab; 42 26 27 static HMODULE dllHandle = 0; 28 43 29 BOOL WINAPI RICHED32_LibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved); 44 } 45 static HMODULE dllHandle = 0; 46 //****************************************************************************** 47 //****************************************************************************** 30 48 31 static BOOL WINAPI OdinLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 49 32 { 50 BOOL ret;33 BOOL ret; 51 34 52 switch (fdwReason)53 {54 case DLL_PROCESS_ATTACH:55 return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);35 switch (fdwReason) 36 { 37 case DLL_PROCESS_ATTACH: 38 return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad); 56 39 57 case DLL_THREAD_ATTACH:58 case DLL_THREAD_DETACH:59 return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);40 case DLL_THREAD_ATTACH: 41 case DLL_THREAD_DETACH: 42 return RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad); 60 43 61 case DLL_PROCESS_DETACH:62 ret = RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad);63 return ret;64 }65 return FALSE;44 case DLL_PROCESS_DETACH: 45 ret = RICHED32_LibMain(hinstDLL, fdwReason, fImpLoad); 46 return ret; 47 } 48 return FALSE; 66 49 } 67 /****************************************************************************/ 68 /* _DLL_InitTerm is the function that gets called by the operating system */ 69 /* loader when it loads and frees this DLL for each process that accesses */ 70 /* this DLL. However, it only gets called the first time the DLL is loaded */ 71 /* and the last time it is freed for a particular process. The system */ 72 /* linkage convention MUST be used because the operating system loader is */ 73 /* calling this function. */ 74 /****************************************************************************/ 75 ULONG APIENTRY inittermRiched32(ULONG hModule, ULONG ulFlag) 50 51 ULONG SYSTEM DLL_InitRichEd32(ULONG hModule) 76 52 { 77 size_t i; 78 APIRET rc; 53 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 79 54 80 /*-------------------------------------------------------------------------*/ 81 /* If ulFlag is zero then the DLL is being loaded so initialization should */ 82 /* be performed. If ulFlag is 1 then the DLL is being freed so */ 83 /* termination should be performed. */ 84 /*-------------------------------------------------------------------------*/ 55 dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&riched32_PEResTab); 56 if (dllHandle == 0) 57 return -1; 85 58 86 switch (ulFlag) { 87 case 0 : 88 CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 89 dllHandle = RegisterLxDll(hModule, OdinLibMain, (PVOID)&riched32_PEResTab); 90 if(dllHandle == 0) 91 return 0UL; 59 return 0; 60 } 92 61 93 break; 62 void SYSTEM DLL_TermRichEd32(ULONG hModule) 63 { 64 if (dllHandle) 65 UnregisterLxDll(dllHandle); 66 } 94 67 95 case 1 : 96 if(dllHandle) { 97 UnregisterLxDll(dllHandle); 98 } 99 break; 100 default : 101 return 0UL; 102 } 68 ULONG SYSTEM DLL_Init(ULONG hModule) 69 { 70 if (DLL_InitDefault(hModule) == -1) 71 return -1; 72 return DLL_InitRichEd32(hModule); 73 } 103 74 104 /***********************************************************/ 105 /* A non-zero value must be returned to indicate success. */ 106 /***********************************************************/107 return 1UL;75 void SYSTEM DLL_Term(ULONG hModule) 76 { 77 DLL_TermRichEd32(hModule); 78 DLL_TermDefault(hModule); 108 79 } 109 //******************************************************************************110 //****************************************************************************** -
branches/gcc-kmk/src/riched32/reader.c
r21308 r21896 82 82 83 83 #ifdef __WIN32OS2__ /* no useful trace in this file! */ 84 #undef TRACE 84 85 #define TRACE(a) do {} while (0) 85 86 #endif -
branches/gcc-kmk/src/riched32/riched32.def
r4809 r21896 9 9 10 10 EXPORTS 11 DllGetVersion = _RICHED32_DllGetVersion@4@211 DllGetVersion = "_RICHED32_DllGetVersion@4" @2 -
branches/gcc-kmk/src/riched32/textwriter.c
r21308 r21896 47 47 48 48 #ifdef __WIN32OS2__ /* no useful trace in this file! */ 49 #undef TRACE 49 50 #define TRACE(a) do {} while (0) 50 51 #endif -
branches/gcc-kmk/src/rsaenh/initterm.cpp
r21842 r21896 1 /* $Id: init gdi32.cpp,v 1.16 2004/01/11 11:42:17 sandervlExp $1 /* $Id: initterm.cpp,v 1.17 2001/09/05 10:26:30 bird Exp $ 2 2 * 3 * DLL entry point3 * RSAENH DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen 6 6 * Copyright 1998 Peter Fitzsimmons 7 7 * 8 *9 8 * Project Odin Software License can be found in LICENSE.TXT 10 *11 9 */ 12 10 13 /*-------------------------------------------------------------*/14 /* INITERM.C -- Source for a custom dynamic link library */15 /* initialization and termination (_DLL_InitTerm) */16 /* function. */17 /* */18 /* When called to perform initialization, this sample function */19 /* gets storage for an array of integers, and initializes its */20 /* elements with random integers. At termination time, it */21 /* frees the array. Substitute your own special processing. */22 /*-------------------------------------------------------------*/23 24 25 /* Include files */26 11 #define INCL_DOSMODULEMGR 27 12 #define INCL_DOSPROCESS … … 38 23 #include <initdll.h> 39 24 40 extern "C" { 41 //Win32 resource table (produced by wrc) 42 //extern DWORD rsaenh_PEResTab; 43 BOOL WINAPI RsaenhDllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved); 44 } 25 //#define DBG_LOCALLOG DBG_initterm 26 //#include "dbglocal.h" 27 28 // Win32 resource table (produced by wrc) 29 //extern DWORD rsaenh_PEResTab; 45 30 46 31 static HMODULE dllHandle = 0; 47 32 33 BOOL WINAPI RsaenhDllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved); 34 48 35 static BOOL WINAPI OdinLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 49 36 { 50 BOOL ret;37 BOOL ret; 51 38 52 switch (fdwReason)53 {54 case DLL_PROCESS_ATTACH:55 return RsaenhDllMain(hinstDLL, fdwReason, fImpLoad);39 switch (fdwReason) 40 { 41 case DLL_PROCESS_ATTACH: 42 return RsaenhDllMain(hinstDLL, fdwReason, fImpLoad); 56 43 57 case DLL_THREAD_ATTACH:58 case DLL_THREAD_DETACH:59 return RsaenhDllMain(hinstDLL, fdwReason, fImpLoad);44 case DLL_THREAD_ATTACH: 45 case DLL_THREAD_DETACH: 46 return RsaenhDllMain(hinstDLL, fdwReason, fImpLoad); 60 47 61 case DLL_PROCESS_DETACH:62 ret = RsaenhDllMain(hinstDLL, fdwReason, fImpLoad);63 return ret;64 }65 return FALSE;48 case DLL_PROCESS_DETACH: 49 ret = RsaenhDllMain(hinstDLL, fdwReason, fImpLoad); 50 return ret; 51 } 52 return FALSE; 66 53 } 67 54 68 /****************************************************************************/ 69 /* _DLL_InitTerm is the function that gets called by the operating system */ 70 /* loader when it loads and frees this DLL for each process that accesses */ 71 /* this DLL. However, it only gets called the first time the DLL is loaded */ 72 /* and the last time it is freed for a particular process. The system */ 73 /* linkage convention MUST be used because the operating system loader is */ 74 /* calling this function. */ 75 /****************************************************************************/ 76 ULONG APIENTRY inittermRsaenh(ULONG hModule, ULONG ulFlag) 55 ULONG SYSTEM DLL_InitRsaEnh(ULONG hModule) 77 56 { 78 size_t i;79 APIRET rc;57 if (!InitializeKernel32()) 58 return 0; 80 59 81 /*-------------------------------------------------------------------------*/ 82 /* If ulFlag is zero then the DLL is being loaded so initialization should */ 83 /* be performed. If ulFlag is 1 then the DLL is being freed so */ 84 /* termination should be performed. */ 85 /*-------------------------------------------------------------------------*/ 60 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 86 61 87 switch (ulFlag) { 88 case 0 : 62 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); 63 if (dllHandle == 0) 64 return -1; 89 65 90 if (!InitializeKernel32()) 91 return 0; 66 dprintf(("Rsaenh init %s %s (%x)", __DATE__, __TIME__, DLL_InitRsaEnh)); 92 67 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); 95 if(dllHandle == 0) 96 return 0UL; 68 return 0; 69 } 97 70 98 dprintf(("Rsaenh init %s %s (%x)", __DATE__, __TIME__, inittermRsaenh)); 71 void SYSTEM DLL_TermRsaEnh(ULONG hModule) 72 { 73 if (dllHandle) 74 UnregisterLxDll(dllHandle); 75 } 99 76 100 break; 101 case 1 : 102 if(dllHandle) { 103 UnregisterLxDll(dllHandle); 104 } 105 break; 106 default : 107 return 0UL; 108 } 77 ULONG SYSTEM DLL_Init(ULONG hModule) 78 { 79 if (DLL_InitDefault(hModule) == -1) 80 return -1; 81 return DLL_InitRsaEnh(hModule); 82 } 109 83 110 /***********************************************************/ 111 /* A non-zero value must be returned to indicate success. */ 112 /***********************************************************/113 return 1UL;84 void SYSTEM DLL_Term(ULONG hModule) 85 { 86 DLL_TermRsaEnh(hModule); 87 DLL_TermDefault(hModule); 114 88 } 115 //******************************************************************************116 //****************************************************************************** -
branches/gcc-kmk/src/rsaenh/rsaenh.c
r21494 r21896 929 929 RegSetValueExA(hKey, szValueName, 0, REG_BINARY, 930 930 blobOut.pbData, blobOut.cbData); 931 LocalFree( blobOut.pbData);931 LocalFree((HLOCAL)blobOut.pbData); 932 932 } 933 933 } … … 1171 1171 ret = RSAENH_CPImportKey(hKeyContainer, blobOut.pbData, blobOut.cbData, 0, 0, 1172 1172 phCryptKey); 1173 LocalFree( blobOut.pbData);1173 LocalFree((HLOCAL)blobOut.pbData); 1174 1174 } 1175 1175 } -
branches/gcc-kmk/src/rsaenh/rsaenh.def
r21494 r21896 5 5 EXPORTS 6 6 7 CPAcquireContext = _RSAENH_CPAcquireContext@16@18 CPCreateHash = _RSAENH_CPCreateHash@20@29 CPDecrypt = _RSAENH_CPDecrypt@28@310 CPDeriveKey = _RSAENH_CPDeriveKey@20@411 CPDestroyHash = _RSAENH_CPDestroyHash@8@512 CPDestroyKey = _RSAENH_CPDestroyKey@8@613 CPDuplicateHash = _RSAENH_CPDuplicateHash@20@714 CPDuplicateKey = _RSAENH_CPDuplicateKey@20@815 CPEncrypt = _RSAENH_CPEncrypt@32@916 CPExportKey = _RSAENH_CPExportKey@28@1017 CPGenKey = _RSAENH_CPGenKey@16@1118 CPGenRandom = _RSAENH_CPGenRandom@12@1219 CPGetHashParam = _RSAENH_CPGetHashParam@24@1320 CPGetKeyParam = _RSAENH_CPGetKeyParam@24@1421 CPGetProvParam = _RSAENH_CPGetProvParam@20@1522 CPGetUserKey = _RSAENH_CPGetUserKey@12@1623 CPHashData = _RSAENH_CPHashData@20@1724 CPHashSessionKey = _RSAENH_CPHashSessionKey@16@1825 CPImportKey = _RSAENH_CPImportKey@24@1926 CPReleaseContext = _RSAENH_CPReleaseContext@8@2027 CPSetHashParam = _RSAENH_CPSetHashParam@20@2128 CPSetKeyParam = _RSAENH_CPSetKeyParam@20@2229 CPSetProvParam = _RSAENH_CPSetProvParam@16@2330 CPSignHash = _RSAENH_CPSignHash@28@2431 CPVerifySignature = _RSAENH_CPVerifySignature@28@2532 DllRegisterServer = _DllRegisterServer@0@2633 DllUnregisterServer = _DllUnregisterServer@0@277 CPAcquireContext = "_RSAENH_CPAcquireContext@16" @1 8 CPCreateHash = "_RSAENH_CPCreateHash@20" @2 9 CPDecrypt = "_RSAENH_CPDecrypt@28" @3 10 CPDeriveKey = "_RSAENH_CPDeriveKey@20" @4 11 CPDestroyHash = "_RSAENH_CPDestroyHash@8" @5 12 CPDestroyKey = "_RSAENH_CPDestroyKey@8" @6 13 CPDuplicateHash = "_RSAENH_CPDuplicateHash@20" @7 14 CPDuplicateKey = "_RSAENH_CPDuplicateKey@20" @8 15 CPEncrypt = "_RSAENH_CPEncrypt@32" @9 16 CPExportKey = "_RSAENH_CPExportKey@28" @10 17 CPGenKey = "_RSAENH_CPGenKey@16" @11 18 CPGenRandom = "_RSAENH_CPGenRandom@12" @12 19 CPGetHashParam = "_RSAENH_CPGetHashParam@24" @13 20 CPGetKeyParam = "_RSAENH_CPGetKeyParam@24" @14 21 CPGetProvParam = "_RSAENH_CPGetProvParam@20" @15 22 CPGetUserKey = "_RSAENH_CPGetUserKey@12" @16 23 CPHashData = "_RSAENH_CPHashData@20" @17 24 CPHashSessionKey = "_RSAENH_CPHashSessionKey@16" @18 25 CPImportKey = "_RSAENH_CPImportKey@24" @19 26 CPReleaseContext = "_RSAENH_CPReleaseContext@8" @20 27 CPSetHashParam = "_RSAENH_CPSetHashParam@20" @21 28 CPSetKeyParam = "_RSAENH_CPSetKeyParam@20" @22 29 CPSetProvParam = "_RSAENH_CPSetProvParam@16" @23 30 CPSignHash = "_RSAENH_CPSignHash@28" @24 31 CPVerifySignature = "_RSAENH_CPVerifySignature@28" @25 32 DllRegisterServer = "_DllRegisterServer@0" @26 33 DllUnregisterServer = "_DllUnregisterServer@0" @27 34 34 35 35 IMPORTS 36 36 37 _MD4Final@4= ADVAPI32.50338 _MD5Final@4= ADVAPI32.50639 _MD4Update@12= ADVAPI32.50540 _MD5Update@12= ADVAPI32.50841 _A_SHAInit@4= ADVAPI32.50142 _A_SHAFinal@8= ADVAPI32.50043 _A_SHAUpdate@12= ADVAPI32.50244 _MD4Init@4= ADVAPI32.50445 _MD5Init@4= ADVAPI32.50737 "_MD4Final@4" = ADVAPI32.503 38 "_MD5Final@4" = ADVAPI32.506 39 "_MD4Update@12" = ADVAPI32.505 40 "_MD5Update@12" = ADVAPI32.508 41 "_A_SHAInit@4" = ADVAPI32.501 42 "_A_SHAFinal@8" = ADVAPI32.500 43 "_A_SHAUpdate@12" = ADVAPI32.502 44 "_MD4Init@4" = ADVAPI32.504 45 "_MD5Init@4" = ADVAPI32.507 46 46 _wsnprintfA = USER32.2100 47 _SystemFunction036@8= ADVAPI32.40247 "_SystemFunction036@8" = ADVAPI32.402 -
branches/gcc-kmk/src/schannel/initterm.cpp
r21842 r21896 1 /* $Id: init gdi32.cpp,v 1.16 2004/01/11 11:42:17 sandervlExp $1 /* $Id: initterm.cpp,v 1.17 2001/09/05 10:26:30 bird Exp $ 2 2 * 3 * DLL entry point3 * SCHANNEL DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen 6 6 * Copyright 1998 Peter Fitzsimmons 7 7 * 8 *9 8 * Project Odin Software License can be found in LICENSE.TXT 10 *11 9 */ 12 10 13 /*-------------------------------------------------------------*/14 /* INITERM.C -- Source for a custom dynamic link library */15 /* initialization and termination (_DLL_InitTerm) */16 /* function. */17 /* */18 /* When called to perform initialization, this sample function */19 /* gets storage for an array of integers, and initializes its */20 /* elements with random integers. At termination time, it */21 /* frees the array. Substitute your own special processing. */22 /*-------------------------------------------------------------*/23 24 25 /* Include files */26 11 #define INCL_DOSMODULEMGR 27 12 #define INCL_DOSPROCESS … … 38 23 #include <initdll.h> 39 24 40 extern "C" { 41 //Win32 resource table (produced by wrc) 42 //extern DWORD rsaenh_PEResTab; 43 BOOL WINAPI SChannelDllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved); 44 } 25 //#define DBG_LOCALLOG DBG_initterm 26 //#include "dbglocal.h" 27 28 // Win32 resource table (produced by wrc) 29 //extern DWORD rsaenh_PEResTab; 45 30 46 31 static HMODULE dllHandle = 0; 47 32 33 BOOL WINAPI SChannelDllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved); 34 48 35 static BOOL WINAPI OdinLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 49 36 { 50 BOOL ret;37 BOOL ret; 51 38 52 switch (fdwReason)53 {54 case DLL_PROCESS_ATTACH:55 return SChannelDllMain(hinstDLL, fdwReason, fImpLoad);39 switch (fdwReason) 40 { 41 case DLL_PROCESS_ATTACH: 42 return SChannelDllMain(hinstDLL, fdwReason, fImpLoad); 56 43 57 case DLL_THREAD_ATTACH:58 case DLL_THREAD_DETACH:59 return SChannelDllMain(hinstDLL, fdwReason, fImpLoad);44 case DLL_THREAD_ATTACH: 45 case DLL_THREAD_DETACH: 46 return SChannelDllMain(hinstDLL, fdwReason, fImpLoad); 60 47 61 case DLL_PROCESS_DETACH:62 ret = SChannelDllMain(hinstDLL, fdwReason, fImpLoad);63 return ret;64 }65 return FALSE;48 case DLL_PROCESS_DETACH: 49 ret = SChannelDllMain(hinstDLL, fdwReason, fImpLoad); 50 return ret; 51 } 52 return FALSE; 66 53 } 67 54 68 /****************************************************************************/ 69 /* _DLL_InitTerm is the function that gets called by the operating system */ 70 /* loader when it loads and frees this DLL for each process that accesses */ 71 /* this DLL. However, it only gets called the first time the DLL is loaded */ 72 /* and the last time it is freed for a particular process. The system */ 73 /* linkage convention MUST be used because the operating system loader is */ 74 /* calling this function. */ 75 /****************************************************************************/ 76 ULONG APIENTRY inittermSChannel(ULONG hModule, ULONG ulFlag) 55 ULONG SYSTEM DLL_InitSChannel(ULONG hModule) 77 56 { 78 size_t i;79 APIRET rc;57 if (!InitializeKernel32()) 58 return 0; 80 59 81 /*-------------------------------------------------------------------------*/ 82 /* If ulFlag is zero then the DLL is being loaded so initialization should */ 83 /* be performed. If ulFlag is 1 then the DLL is being freed so */ 84 /* termination should be performed. */ 85 /*-------------------------------------------------------------------------*/ 60 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 86 61 87 switch (ulFlag) { 88 case 0 : 62 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); 63 if (dllHandle == 0) 64 return -1; 89 65 90 if (!InitializeKernel32()) 91 return 0; 66 dprintf(("schannel init %s %s (%x)", __DATE__, __TIME__, DLL_InitSChannel)); 92 67 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); 95 if(dllHandle == 0) 96 return 0UL; 68 return 0; 69 } 97 70 98 dprintf(("Secur32 init %s %s (%x)", __DATE__, __TIME__, inittermSChannel)); 71 void SYSTEM DLL_TermSChannel(ULONG hModule) 72 { 73 if (dllHandle) 74 UnregisterLxDll(dllHandle); 75 } 99 76 100 break; 101 case 1 : 102 if(dllHandle) { 103 UnregisterLxDll(dllHandle); 104 } 105 break; 106 default : 107 return 0UL; 108 } 77 ULONG SYSTEM DLL_Init(ULONG hModule) 78 { 79 if (DLL_InitDefault(hModule) == -1) 80 return -1; 81 return DLL_InitSChannel(hModule); 82 } 109 83 110 /***********************************************************/ 111 /* A non-zero value must be returned to indicate success. */ 112 /***********************************************************/113 return 1UL;84 void SYSTEM DLL_Term(ULONG hModule) 85 { 86 DLL_TermSChannel(hModule); 87 DLL_TermDefault(hModule); 114 88 } 115 //******************************************************************************116 //****************************************************************************** -
branches/gcc-kmk/src/schannel/schannel.def
r21373 r21896 8 8 ;ApplyControlToken = _CollectSslPerformanceData @6 9 9 ;MakeSignature = _OpenSslPerformanceData @19 10 SpLsaModeInitialize = _SpLsaModeInitialize@16@2611 SpUserModeInitialize = _SpUserModeInitialize@16@2710 SpLsaModeInitialize = "_SpLsaModeInitialize@16" @26 11 SpUserModeInitialize = "_SpUserModeInitialize@16" @27 12 12 ;SpUserModeInitialize = _SslCrackCertificate @28 13 13 ;SpUserModeInitialize = _SslEmptyCacheA @29 … … 20 20 21 21 ;forwarders from secur32 22 AcceptSecurityContext = _AcceptSecurityContext@3623 AcquireCredentialsHandleA = _AcquireCredentialsHandleA@3624 AcquireCredentialsHandleW = _AcquireCredentialsHandleW@3625 ApplyControlToken = _ApplyControlToken@826 DeleteSecurityContext = _DeleteSecurityContext@427 EnumerateSecurityPackagesA = _EnumerateSecurityPackagesA@828 EnumerateSecurityPackagesW = _EnumerateSecurityPackagesW@829 FreeContextBuffer = _FreeContextBuffer@430 FreeCredentialsHandle = _FreeCredentialsHandle@431 ImpersonateSecurityContext = _ImpersonateSecurityContext@432 InitSecurityInterfaceA = _InitSecurityInterfaceA@033 InitSecurityInterfaceW = _InitSecurityInterfaceW@034 InitializeSecurityContextA = _InitializeSecurityContextA@4835 InitializeSecurityContextW = _InitializeSecurityContextW@4836 MakeSignature = _MakeSignature@1637 CompleteAuthToken = _CompleteAuthToken@838 QueryContextAttributesA = _QueryContextAttributesA@1239 QueryContextAttributesW = _QueryContextAttributesW@1240 QuerySecurityPackageInfoA = _QuerySecurityPackageInfoA@841 QuerySecurityPackageInfoW = _QuerySecurityPackageInfoW@842 RevertSecurityContext = _RevertSecurityContext@443 SealMessage = _SealMessage@1644 UnsealMessage = _UnsealMessage@1645 VerifySignature = _VerifySignature@1622 AcceptSecurityContext = "_AcceptSecurityContext@36" @1000 23 AcquireCredentialsHandleA = "_AcquireCredentialsHandleA@36" @1001 24 AcquireCredentialsHandleW = "_AcquireCredentialsHandleW@36" @1002 25 ApplyControlToken = "_ApplyControlToken@8" @1003 26 DeleteSecurityContext = "_DeleteSecurityContext@4" @1004 27 EnumerateSecurityPackagesA = "_EnumerateSecurityPackagesA@8" @1005 28 EnumerateSecurityPackagesW = "_EnumerateSecurityPackagesW@8" @1006 29 FreeContextBuffer = "_FreeContextBuffer@4" @1007 30 FreeCredentialsHandle = "_FreeCredentialsHandle@4" @1008 31 ImpersonateSecurityContext = "_ImpersonateSecurityContext@4" @1009 32 InitSecurityInterfaceA = "_InitSecurityInterfaceA@0" @1010 33 InitSecurityInterfaceW = "_InitSecurityInterfaceW@0" @1011 34 InitializeSecurityContextA = "_InitializeSecurityContextA@48" @1012 35 InitializeSecurityContextW = "_InitializeSecurityContextW@48" @1013 36 MakeSignature = "_MakeSignature@16" @1014 37 CompleteAuthToken = "_CompleteAuthToken@8" @1015 38 QueryContextAttributesA = "_QueryContextAttributesA@12" @1016 39 QueryContextAttributesW = "_QueryContextAttributesW@12" @1017 40 QuerySecurityPackageInfoA = "_QuerySecurityPackageInfoA@8" @1018 41 QuerySecurityPackageInfoW = "_QuerySecurityPackageInfoW@8" @1019 42 RevertSecurityContext = "_RevertSecurityContext@4" @1020 43 SealMessage = "_SealMessage@16" @1021 44 UnsealMessage = "_UnsealMessage@16" @1022 45 VerifySignature = "_VerifySignature@16" @1023 -
branches/gcc-kmk/src/secur32/initterm.cpp
r21842 r21896 1 /* $Id: init gdi32.cpp,v 1.16 2004/01/11 11:42:17 sandervlExp $1 /* $Id: initterm.cpp,v 1.17 2001/09/05 10:26:30 bird Exp $ 2 2 * 3 * DLL entry point3 * SECUR32 DLL entry point 4 4 * 5 5 * Copyright 1998 Sander van Leeuwen 6 6 * Copyright 1998 Peter Fitzsimmons 7 7 * 8 *9 8 * Project Odin Software License can be found in LICENSE.TXT 10 *11 9 */ 12 10 13 /*-------------------------------------------------------------*/14 /* INITERM.C -- Source for a custom dynamic link library */15 /* initialization and termination (_DLL_InitTerm) */16 /* function. */17 /* */18 /* When called to perform initialization, this sample function */19 /* gets storage for an array of integers, and initializes its */20 /* elements with random integers. At termination time, it */21 /* frees the array. Substitute your own special processing. */22 /*-------------------------------------------------------------*/23 24 25 /* Include files */26 11 #define INCL_DOSMODULEMGR 27 12 #define INCL_DOSPROCESS … … 38 23 #include <initdll.h> 39 24 40 extern "C" { 41 //Win32 resource table (produced by wrc) 42 //extern DWORD rsaenh_PEResTab; 43 BOOL WINAPI Secur32DllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved); 44 } 25 //#define DBG_LOCALLOG DBG_initterm 26 //#include "dbglocal.h" 27 28 // Win32 resource table (produced by wrc) 29 //extern DWORD secur32_PEResTab; 45 30 46 31 static HMODULE dllHandle = 0; 47 32 33 BOOL WINAPI Secur32DllMain(HINSTANCE hInst, DWORD fdwReason, PVOID pvReserved); 34 48 35 static BOOL WINAPI OdinLibMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad) 49 36 { 50 BOOL ret;37 BOOL ret; 51 38 52 switch (fdwReason)53 {54 case DLL_PROCESS_ATTACH:55 return Secur32DllMain(hinstDLL, fdwReason, fImpLoad);39 switch (fdwReason) 40 { 41 case DLL_PROCESS_ATTACH: 42 return Secur32DllMain(hinstDLL, fdwReason, fImpLoad); 56 43 57 case DLL_THREAD_ATTACH:58 case DLL_THREAD_DETACH:59 return Secur32DllMain(hinstDLL, fdwReason, fImpLoad);44 case DLL_THREAD_ATTACH: 45 case DLL_THREAD_DETACH: 46 return Secur32DllMain(hinstDLL, fdwReason, fImpLoad); 60 47 61 case DLL_PROCESS_DETACH:62 ret = Secur32DllMain(hinstDLL, fdwReason, fImpLoad);63 return ret;64 }65 return FALSE;48 case DLL_PROCESS_DETACH: 49 ret = Secur32DllMain(hinstDLL, fdwReason, fImpLoad); 50 return ret; 51 } 52 return FALSE; 66 53 } 67 54 68 /****************************************************************************/ 69 /* _DLL_InitTerm is the function that gets called by the operating system */ 70 /* loader when it loads and frees this DLL for each process that accesses */ 71 /* this DLL. However, it only gets called the first time the DLL is loaded */ 72 /* and the last time it is freed for a particular process. The system */ 73 /* linkage convention MUST be used because the operating system loader is */ 74 /* calling this function. */ 75 /****************************************************************************/ 76 ULONG APIENTRY inittermSecur32(ULONG hModule, ULONG ulFlag) 55 ULONG SYSTEM DLL_InitSecur32(ULONG hModule) 77 56 { 78 size_t i;79 APIRET rc;57 if (!InitializeKernel32()) 58 return 0; 80 59 81 /*-------------------------------------------------------------------------*/ 82 /* If ulFlag is zero then the DLL is being loaded so initialization should */ 83 /* be performed. If ulFlag is 1 then the DLL is being freed so */ 84 /* termination should be performed. */ 85 /*-------------------------------------------------------------------------*/ 60 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 86 61 87 switch (ulFlag) { 88 case 0 : 62 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); 63 if (dllHandle == 0) 64 return -1; 89 65 90 if (!InitializeKernel32()) 91 return 0; 66 dprintf(("Secur32 init %s %s (%x)", __DATE__, __TIME__, DLL_InitSecur32)); 92 67 93 //CheckVersionFromHMOD(PE2LX_VERSION, hModule); /*PLF Wed 98-03-18 05:28:48*/ 94 dllHandle = RegisterLxDll(hModule, OdinLibMain, NULL); 95 if(dllHandle == 0) 96 return 0UL; 68 return 0; 69 } 97 70 98 dprintf(("Secur32 init %s %s (%x)", __DATE__, __TIME__, inittermSecur32)); 71 void SYSTEM DLL_TermSecur32(ULONG hModule) 72 { 73 if (dllHandle) 74 UnregisterLxDll(dllHandle); 75 } 99 76 100 break; 101 case 1 : 102 if(dllHandle) { 103 UnregisterLxDll(dllHandle); 104 } 105 break; 106 default : 107 return 0UL; 108 } 77 ULONG SYSTEM DLL_Init(ULONG hModule) 78 { 79 if (DLL_InitDefault(hModule) == -1) 80 return -1; 81 return DLL_InitSecur32(hModule); 82 } 109 83 110 /***********************************************************/ 111 /* A non-zero value must be returned to indicate success. */ 112 /***********************************************************/113 return 1UL;84 void SYSTEM DLL_Term(ULONG hModule) 85 { 86 DLL_TermSecur32(hModule); 87 DLL_TermDefault(hModule); 114 88 } 115 //******************************************************************************116 //****************************************************************************** -
branches/gcc-kmk/src/secur32/secur32.c
r21364 r21896 17 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 18 18 */ 19 19 20 #include <assert.h> 20 21 #include <stdarg.h> 22 #include <memory.h> 21 23 22 24 #include "ntstatus.h" … … 61 63 * Prototypes 62 64 */ 65 66 ULONG WIN32API LsaNtStatusToWinError(NTSTATUS Status); 63 67 64 68 /* Tries to load moduleName as a provider. If successful, enumerates what -
branches/gcc-kmk/src/secur32/secur32.def
r21364 r21896 5 5 EXPORTS 6 6 7 AcceptSecurityContext = _AcceptSecurityContext@36@18 AcquireCredentialsHandleA = _AcquireCredentialsHandleA@36@29 AcquireCredentialsHandleW = _AcquireCredentialsHandleW@36@310 AddCredentialsA = _AddCredentialsA@32@411 AddCredentialsW = _AddCredentialsW@32@57 AcceptSecurityContext = "_AcceptSecurityContext@36" @1 8 AcquireCredentialsHandleA = "_AcquireCredentialsHandleA@36" @2 9 AcquireCredentialsHandleW = "_AcquireCredentialsHandleW@36" @3 10 AddCredentialsA = "_AddCredentialsA@32" @4 11 AddCredentialsW = "_AddCredentialsW@32" @5 12 12 ;AddCredentialsW = _AddSecurityPackageA @6 13 13 ;AddCredentialsW = _AddSecurityPackageW @7 14 ApplyControlToken = _ApplyControlToken@8@815 CompleteAuthToken = _CompleteAuthToken@8@916 DecryptMessage = _DecryptMessage@16@1017 DeleteSecurityContext = _DeleteSecurityContext@4@1114 ApplyControlToken = "_ApplyControlToken@8" @8 15 CompleteAuthToken = "_CompleteAuthToken@8" @9 16 DecryptMessage = "_DecryptMessage@16" @10 17 DeleteSecurityContext = "_DeleteSecurityContext@4" @11 18 18 ;DeleteSecurityContext = _DeleteSecurityPackageA @12 19 19 ;DeleteSecurityContext = _DeleteSecurityPackageW @13 20 EncryptMessage = _EncryptMessage@16@1421 EnumerateSecurityPackagesA = _EnumerateSecurityPackagesA@8@1522 EnumerateSecurityPackagesW = _EnumerateSecurityPackagesW@8@1623 ExportSecurityContext = _ExportSecurityContext@16@1724 FreeContextBuffer = _FreeContextBuffer@4@1825 FreeCredentialsHandle = _FreeCredentialsHandle@4@1926 GetComputerObjectNameA = _GetComputerObjectNameA@12@2027 GetComputerObjectNameW = _GetComputerObjectNameW@12@2120 EncryptMessage = "_EncryptMessage@16" @14 21 EnumerateSecurityPackagesA = "_EnumerateSecurityPackagesA@8" @15 22 EnumerateSecurityPackagesW = "_EnumerateSecurityPackagesW@8" @16 23 ExportSecurityContext = "_ExportSecurityContext@16" @17 24 FreeContextBuffer = "_FreeContextBuffer@4" @18 25 FreeCredentialsHandle = "_FreeCredentialsHandle@4" @19 26 GetComputerObjectNameA = "_GetComputerObjectNameA@12" @20 27 GetComputerObjectNameW = "_GetComputerObjectNameW@12" @21 28 28 ;GetComputerObjectNameW = _GetSecurityUserInfo @22 29 GetUserNameExA = _GetUserNameExA@12@2330 GetUserNameExW = _GetUserNameExW@12@2431 ImpersonateSecurityContext = _ImpersonateSecurityContext@4@2532 ImportSecurityContextA = _ImportSecurityContextA@16@2633 ImportSecurityContextW = _ImportSecurityContextW@16@2734 InitSecurityInterfaceA = _InitSecurityInterfaceA@0@2835 InitSecurityInterfaceW = _InitSecurityInterfaceW@0@2936 InitializeSecurityContextA = _InitializeSecurityContextA@48@3037 InitializeSecurityContextW = _InitializeSecurityContextW@48@3138 LsaCallAuthenticationPackage = _LsaCallAuthenticationPackage@28@3239 LsaConnectUntrusted = _LsaConnectUntrusted@4@3340 LsaDeregisterLogonProcess = _LsaDeregisterLogonProcess@4@3441 LsaEnumerateLogonSessions = _LsaEnumerateLogonSessions@8@3542 LsaFreeReturnBuffer = _LsaFreeReturnBuffer@4@3643 LsaGetLogonSessionData = _LsaGetLogonSessionData@8@3744 LsaLogonUser = _LsaLogonUser@56@3845 LsaLookupAuthenticationPackage = _LsaLookupAuthenticationPackage@12@3946 LsaRegisterLogonProcess = _LsaRegisterLogonProcess@12@4029 GetUserNameExA = "_GetUserNameExA@12" @23 30 GetUserNameExW = "_GetUserNameExW@12" @24 31 ImpersonateSecurityContext = "_ImpersonateSecurityContext@4" @25 32 ImportSecurityContextA = "_ImportSecurityContextA@16" @26 33 ImportSecurityContextW = "_ImportSecurityContextW@16" @27 34 InitSecurityInterfaceA = "_InitSecurityInterfaceA@0" @28 35 InitSecurityInterfaceW = "_InitSecurityInterfaceW@0" @29 36 InitializeSecurityContextA = "_InitializeSecurityContextA@48" @30 37 InitializeSecurityContextW = "_InitializeSecurityContextW@48" @31 38 LsaCallAuthenticationPackage = "_LsaCallAuthenticationPackage@28" @32 39 LsaConnectUntrusted = "_LsaConnectUntrusted@4" @33 40 LsaDeregisterLogonProcess = "_LsaDeregisterLogonProcess@4" @34 41 LsaEnumerateLogonSessions = "_LsaEnumerateLogonSessions@8" @35 42 LsaFreeReturnBuffer = "_LsaFreeReturnBuffer@4" @36 43 LsaGetLogonSessionData = "_LsaGetLogonSessionData@8" @37 44 LsaLogonUser = "_LsaLogonUser@56" @38 45 LsaLookupAuthenticationPackage = "_LsaLookupAuthenticationPackage@12" @39 46 LsaRegisterLogonProcess = "_LsaRegisterLogonProcess@12" @40 47 47 ;LsaRegisterLogonProcess = _LsaRegisterPolicyChangeNotification @41 48 48 ;LsaRegisterLogonProcess = _LsaUnregisterPolicyChangeNotification @42 49 MakeSignature = _MakeSignature@16@4350 QueryContextAttributesA = _QueryContextAttributesA@12@4451 QueryContextAttributesW = _QueryContextAttributesW@12@4552 QueryCredentialsAttributesA = _QueryCredentialsAttributesA@12@4653 QueryCredentialsAttributesW = _QueryCredentialsAttributesW@12@4754 QuerySecurityContextToken = _QuerySecurityContextToken@8@4855 QuerySecurityPackageInfoA = _QuerySecurityPackageInfoA@8@4956 QuerySecurityPackageInfoW = _QuerySecurityPackageInfoW@8@5057 RevertSecurityContext = _RevertSecurityContext@4@5149 MakeSignature = "_MakeSignature@16" @43 50 QueryContextAttributesA = "_QueryContextAttributesA@12" @44 51 QueryContextAttributesW = "_QueryContextAttributesW@12" @45 52 QueryCredentialsAttributesA = "_QueryCredentialsAttributesA@12" @46 53 QueryCredentialsAttributesW = "_QueryCredentialsAttributesW@12" @47 54 QuerySecurityContextToken = "_QuerySecurityContextToken@8" @48 55 QuerySecurityPackageInfoA = "_QuerySecurityPackageInfoA@8" @49 56 QuerySecurityPackageInfoW = "_QuerySecurityPackageInfoW@8" @50 57 RevertSecurityContext = "_RevertSecurityContext@4" @51 58 58 ;RevertSecurityContext = _SaslAcceptSecurityContext @52 59 59 ;RevertSecurityContext = _SaslEnumerateProfilesA @53 … … 65 65 ;RevertSecurityContext = _SaslInitializeSecurityContextA @59 66 66 ;RevertSecurityContext = _SaslInitializeSecurityContextW @60 67 SealMessage = _EncryptMessage@16@6167 SealMessage = "_EncryptMessage@16" @61 68 68 ;SealMessage = _SecCacheSspiPackages @62 69 69 ;SealMessage = _SecGetLocaleSpecificEncryptionRules @63 … … 71 71 ;SealMessage = _SecpTranslateName @65 72 72 ;SealMessage = _SecpTranslateNameEx @66 73 TranslateNameA = _TranslateNameA@20@6774 TranslateNameW = _TranslateNameW@20@6875 UnsealMessage = _DecryptMessage@16@6976 VerifySignature = _VerifySignature@16@7073 TranslateNameA = "_TranslateNameA@20" @67 74 TranslateNameW = "_TranslateNameW@20" @68 75 UnsealMessage = "_DecryptMessage@16" @69 76 VerifySignature = "_VerifySignature@16" @70 77 77 78 78 IMPORTS 79 79 80 80 CredFree = ADVAPI32.509 81 _CredReadW@16 = ADVAPI32.510 82 LsaNtStatusToWinError = ADVAPI32.223 83 _NetWkstaUserGetInfo@12 = NETAPI32.202 81 "_CredReadW@16" = ADVAPI32.510 82 "_NetWkstaUserGetInfo@12" = NETAPI32.202 84 83 -
branches/gcc-kmk/src/secur32/secur32_priv.h
r21364 r21896 25 25 #include "wine/list.h" 26 26 27 #ifndef __EMX__ 27 28 typedef ULONG pid_t; 29 #endif 28 30 29 31 typedef struct _SecureProvider -
branches/gcc-kmk/src/secur32/thunks.c
r21364 r21896 18 18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 19 19 */ 20 20 21 #include <stdarg.h> 22 #include <memory.h> 23 21 24 #include "windef.h" 22 25 #include "winbase.h" -
branches/gcc-kmk/src/secur32/util.c
r21364 r21896 18 18 * This file contains various helper functions needed for NTLM and maybe others 19 19 */ 20 20 21 #include <stdarg.h> 21 22 #include <stdio.h> 23 #include <memory.h> 24 22 25 #include "windef.h" 23 26 #include "winbase.h"
Note:
See TracChangeset
for help on using the changeset viewer.