Commit 4460f173 authored by Balázs Székely's avatar Balázs Székely
Browse files

OpkMan: Switch to Openssl 1.1.1o

parent c34faebe
......@@ -48,10 +48,12 @@ const
cHelpPage_CreateRepositoryPackage = 'http://wiki.freepascal.org/Online_Package_Manager#Create_repository_package';
cHelpPage_CreateExternalJSON = 'http://wiki.freepascal.org/Online_Package_Manager#Create_JSON_for_updates';
{$ifdef win64}
cOpenSSLURL = 'http://packages.lazarus-ide.org/openssl-1.0.2j-x64_86-win64.zip';
//cOpenSSLURL = 'http://packages.lazarus-ide.org/openssl-1.0.2j-x64_86-win64.zip';
cOpenSSLURL = 'http://packages.lazarus-ide.org/openssl-1.1.1o-x64_86-win64.zip';
{$endif}
{$ifdef win32}
cOpenSSLURL = 'http://packages.lazarus-ide.org/openssl-1.0.2j-i386-win32.zip';
//cOpenSSLURL = 'http://packages.lazarus-ide.org/openssl-1.0.2j-i386-win32.zip';
cOpenSSLURL = 'http://packages.lazarus-ide.org/openssl-1.1.1o-i386-win32.zip';
{$endif}
cExtractDir = 'ExtractDir';
cSubmitURL_Zip = 'aHR0cDovL2xhemFydXNvcG0ub3JnL3ppcC5waHA=';
......@@ -536,7 +538,7 @@ resourcestring
rsOpenSSLFrm_Bp_OKButton_Caption = 'Yes';
rsOpenSSLFrm_Bp_CancelButton_Caption = 'No';
rsOpenSSLFrm_chPermanent_Caption = 'Do not ask this question again';
rsOpenSSLFrm_lbMessage1_Caption = 'In order to work properly, OPM needs the OpenSSL libraries: "libeay32.dll" and "ssleay32.dll"';
rsOpenSSLFrm_lbMessage1_Caption = 'In order to work properly, OPM needs the OpenSSL libraries';
rsOpenSSLFrm_lbMessage2_Caption = 'Download these files from "https://packages.lazarus-ide.org/"?';
......
......@@ -572,7 +572,7 @@ object OptionsFrm: TOptionsFrm
BorderSpacing.Left = 10
BorderSpacing.Top = 10
BorderSpacing.Right = 10
Caption = 'In order to work properly, OPM needs the OpenSSL libraries: "libeay32.dll" and "ssleay32.dll"'
Caption = 'In order to work properly, OPM needs the OpenSSL libraries'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
......
......@@ -36,7 +36,7 @@ uses
opkman_serializablepackages, opkman_options, opkman_common, opkman_visualtree,
opkman_OpenSSLfrm,
{$IF FPC_FULLVERSION>=30200}
zipper, fphttpclient, opensslsockets;
zipper, fphttpclient, opensslsockets, openssl;
{$ELSE}
opkman_zip, opkman_httpclient;
{$ENDIF}
......@@ -316,25 +316,6 @@ end;
procedure TUpdates.CheckForOpenSSL;
{$IFDEF MSWINDOWS}
function SystemFolder: String;
var
SysPath: WideString;
begin
SetLength({%H-}SysPath, Windows.MAX_PATH);
SetLength(SysPath, Windows.GetSystemDirectoryW(PWideChar(SysPath), Windows.MAX_PATH));
Result := AppendPathDelim(String(SysPath));
end;
function IsOpenSSLAvailable: Boolean;
var
ParamPath, SysPath: String;
begin
ParamPath := ExtractFilePath(ParamStr(0));
SysPath := SystemFolder;
Result := (FileExists(ParamPath + 'libeay32.dll') and FileExists(ParamPath + 'ssleay32.dll')) or
(FileExists(SysPath + 'libeay32.dll') and FileExists(SysPath + 'ssleay32.dll'));
end;
var
ZipFile: String;
UnZipper: TUnZipper;
......@@ -342,7 +323,8 @@ var
{$ENDIF}
begin
{$IFDEF MSWINDOWS}
FOpenSSLAvailable := IsOpenSSLAvailable;
InitSSLInterface;
FOpenSSLAvailable := IsSSLloaded;
if not FOpenSSLAvailable then
begin
case Options.OpenSSLDownloadType of
......@@ -387,7 +369,8 @@ begin
UnZipper.Free;
end;
DeleteFile(ZipFile);
FOpenSSLAvailable := IsOpenSSLAvailable;
InitSSLInterface;
FOpenSSLAvailable := IsSSLloaded;
end;
end;
end;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment