mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 09:59:08 +02:00
* 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:
parent
ad5b651e81
commit
e95818de2b
@ -1475,6 +1475,7 @@ var
|
|||||||
procedure BN_free(a:PBIGNUM);
|
procedure BN_free(a:PBIGNUM);
|
||||||
|
|
||||||
function IsSSLloaded: Boolean;
|
function IsSSLloaded: Boolean;
|
||||||
|
function InitSSLInterface(Const aSSLName, acryptoName : String) : Boolean; overload;
|
||||||
function InitSSLInterface: Boolean; overload;
|
function InitSSLInterface: Boolean; overload;
|
||||||
function DestroySSLInterface: Boolean;
|
function DestroySSLInterface: Boolean;
|
||||||
|
|
||||||
@ -5694,13 +5695,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
Function LoadLibraries : Boolean;
|
Function LoadLibraries(Const aSSLName, aCryptoName : String) : Boolean;
|
||||||
|
|
||||||
var
|
var
|
||||||
Idx: Integer;
|
Idx: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=False;
|
Result:=False;
|
||||||
|
if (aSSLName<>'') and (aCryptoName<>'') then
|
||||||
|
Exit(TryLoadLibPair(aSSLName,aCryptoName));
|
||||||
{$IF DEFINED(WINDOWS) OR DEFINED(OS2)}
|
{$IF DEFINED(WINDOWS) OR DEFINED(OS2)}
|
||||||
Assert(Low(SSL_DLL_Names) = Low(Crypto_DLL_Names));
|
Assert(Low(SSL_DLL_Names) = Low(Crypto_DLL_Names));
|
||||||
Assert(High(SSL_DLL_Names) = High(Crypto_DLL_Names));
|
Assert(High(SSL_DLL_Names) = High(Crypto_DLL_Names));
|
||||||
@ -5721,6 +5724,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function InitSSLInterface: Boolean;
|
function InitSSLInterface: Boolean;
|
||||||
|
|
||||||
|
begin
|
||||||
|
Result:=InitSSLInterface('','');
|
||||||
|
end;
|
||||||
|
|
||||||
|
function InitSSLInterface(Const aSSLName, acryptoName : String) : Boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Result:=SSLLoaded;
|
Result:=SSLLoaded;
|
||||||
if Result then
|
if Result then
|
||||||
@ -5729,7 +5739,7 @@ begin
|
|||||||
try
|
try
|
||||||
if SSLloaded then
|
if SSLloaded then
|
||||||
Exit;
|
Exit;
|
||||||
Result:=LoadLibraries;
|
Result:=LoadLibraries(aSSLName,aCryptoName);
|
||||||
if Not Result then
|
if Not Result then
|
||||||
begin
|
begin
|
||||||
UnloadLibraries;
|
UnloadLibraries;
|
||||||
|
Loading…
Reference in New Issue
Block a user