* Added InitSSLInterface overload where the library names can be specified

git-svn-id: trunk@47174 -
(cherry picked from commit b5148304b7)
This commit is contained in:
michael 2020-10-24 16:29:33 +00:00 committed by marcoonthegit
parent ad5b651e81
commit e95818de2b

View File

@ -1475,6 +1475,7 @@ var
procedure BN_free(a:PBIGNUM);
function IsSSLloaded: Boolean;
function InitSSLInterface(Const aSSLName, acryptoName : String) : Boolean; overload;
function InitSSLInterface: Boolean; overload;
function DestroySSLInterface: Boolean;
@ -5694,13 +5695,15 @@ begin
end;
{$ENDIF}
Function LoadLibraries : Boolean;
Function LoadLibraries(Const aSSLName, aCryptoName : String) : Boolean;
var
Idx: Integer;
begin
Result:=False;
if (aSSLName<>'') and (aCryptoName<>'') then
Exit(TryLoadLibPair(aSSLName,aCryptoName));
{$IF DEFINED(WINDOWS) OR DEFINED(OS2)}
Assert(Low(SSL_DLL_Names) = Low(Crypto_DLL_Names));
Assert(High(SSL_DLL_Names) = High(Crypto_DLL_Names));
@ -5721,6 +5724,13 @@ begin
end;
function InitSSLInterface: Boolean;
begin
Result:=InitSSLInterface('','');
end;
function InitSSLInterface(Const aSSLName, acryptoName : String) : Boolean;
begin
Result:=SSLLoaded;
if Result then
@ -5729,7 +5739,7 @@ begin
try
if SSLloaded then
Exit;
Result:=LoadLibraries;
Result:=LoadLibraries(aSSLName,aCryptoName);
if Not Result then
begin
UnloadLibraries;