AS
Size: a a a
AS
DB
sed -i "s/'libssl.so'/'libssl.so.10'/g;s/'libcrypto.so'/'libcrypto.so.10'/g" synapse/ssl_openssl_lib.pas
AS
AS
netdb?DB
function FindDLL(const Mask: string): string;
var
AProcess: TProcess;
OutputLines: TStringList;
i: integer;
begin
OutputLines := TStringList.Create;
try
AProcess := TProcess.Create(nil);
try
AProcess.Executable := '/bin/bash';
Aprocess.Parameters.Add('-c');
AProcess.Parameters.Add('ldconfig -p | grep ' + Mask);
AProcess.Options := AProcess.Options + [poWaitOnExit, poUsePipes];
AProcess.Execute;
OutputLines.Add('stdout:');
OutputLines.LoadFromStream(Aprocess.Output);
for i := 0 to OutputLines.Count - 1 do
OutputLines[i] := Trim(Copy2Space(OutputLines[i]));
OutputLines.Sort;
Result := OutputLines[OutputLines.Count - 1];
WriteLog('Found alternate ssl dll name: ' + Result);
finally
AProcess.Free;
end;
finally
OutputLines.Free;
end;
end;
function FindDLLSSLName: string;
begin
Result := FindDLL('libssl.so');
end;
function FindDLLUtilName: string;
begin
Result := FindDLL('libcrypto.so');
end;
DLLSSLName := FindDLLSSLName;
DLLUtilName := FindDLLUtilName;
DB
AS
netdb?RS
AS
DB
DB
M
DB
RS
M
M
DB
DB
M