secur32: Allow loading external schannel.dll.
This commit is contained in:
parent
746cdb4a6d
commit
d42a601b52
|
@ -358,11 +358,12 @@ static const SecurityFunctionTableW schanTableW = {
|
|||
|
||||
static const WCHAR schannelComment[] = { 'S','c','h','a','n','n','e','l',' ',
|
||||
'S','e','c','u','r','i','t','y',' ','P','a','c','k','a','g','e',0 };
|
||||
static const WCHAR schannelDllName[] = { 's','c','h','a','n','n','e','l','.','d','l','l',0 };
|
||||
|
||||
void SECUR32_initSchannelSP(void)
|
||||
{
|
||||
SecureProvider *provider = SECUR32_addProvider(&schanTableA, &schanTableW,
|
||||
NULL);
|
||||
schannelDllName);
|
||||
|
||||
if (provider)
|
||||
{
|
||||
|
|
|
@ -419,10 +419,10 @@ SecureProvider *SECUR32_addProvider(const SecurityFunctionTableA *fnTableA,
|
|||
|
||||
if (fnTableA || fnTableW)
|
||||
{
|
||||
ret->moduleName = NULL;
|
||||
ret->moduleName = moduleName ? SECUR32_strdupW(moduleName) : NULL;
|
||||
_makeFnTableA(&ret->fnTableA, fnTableA, fnTableW);
|
||||
_makeFnTableW(&ret->fnTableW, fnTableA, fnTableW);
|
||||
ret->loaded = TRUE;
|
||||
ret->loaded = moduleName ? FALSE : TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -505,9 +505,19 @@ static void _tryLoadProvider(PWSTR moduleName)
|
|||
if (pInitSecurityInterfaceW)
|
||||
fnTableW = pInitSecurityInterfaceW();
|
||||
if (fnTableW && fnTableW->EnumerateSecurityPackagesW)
|
||||
ret = fnTableW->EnumerateSecurityPackagesW(&toAdd, &infoW);
|
||||
{
|
||||
if (fnTableW != &securityFunctionTableW)
|
||||
ret = fnTableW->EnumerateSecurityPackagesW(&toAdd, &infoW);
|
||||
else
|
||||
TRACE("%s has built-in providers, skip adding\n", debugstr_w(moduleName));
|
||||
}
|
||||
else if (fnTableA && fnTableA->EnumerateSecurityPackagesA)
|
||||
ret = fnTableA->EnumerateSecurityPackagesA(&toAdd, &infoA);
|
||||
{
|
||||
if (fnTableA != &securityFunctionTableA)
|
||||
ret = fnTableA->EnumerateSecurityPackagesA(&toAdd, &infoA);
|
||||
else
|
||||
TRACE("%s has built-in providers, skip adding\n", debugstr_w(moduleName));
|
||||
}
|
||||
if (ret == SEC_E_OK && toAdd > 0 && (infoW || infoA))
|
||||
{
|
||||
SecureProvider *provider = SECUR32_addProvider(NULL, NULL,
|
||||
|
@ -624,8 +634,11 @@ SecurePackage *SECUR32_findPackageW(PCWSTR packageName)
|
|||
fnTableA = pInitSecurityInterfaceA();
|
||||
if (pInitSecurityInterfaceW)
|
||||
fnTableW = pInitSecurityInterfaceW();
|
||||
_makeFnTableA(&ret->provider->fnTableA, fnTableA, fnTableW);
|
||||
_makeFnTableW(&ret->provider->fnTableW, fnTableA, fnTableW);
|
||||
/* dont't update built-in SecurityFunctionTable */
|
||||
if (fnTableA != &securityFunctionTableA)
|
||||
_makeFnTableA(&ret->provider->fnTableA, fnTableA, fnTableW);
|
||||
if (fnTableW != &securityFunctionTableW)
|
||||
_makeFnTableW(&ret->provider->fnTableW, fnTableA, fnTableW);
|
||||
ret->provider->loaded = TRUE;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -89,7 +89,8 @@ typedef enum _sign_direction {
|
|||
} SignDirection;
|
||||
|
||||
/* Allocates space for and initializes a new provider. If fnTableA or fnTableW
|
||||
* is non-NULL, assumes the provider is built-in (and is thus already loaded.)
|
||||
* is non-NULL, assumes the provider is built-in, and if moduleName is non-NULL,
|
||||
* means must load the LSA/user mode functions tables from external SSP/AP module.
|
||||
* Otherwise moduleName must not be NULL.
|
||||
* Returns a pointer to the stored provider entry, for use adding packages.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue