Skip to content

Commit 64be9e3

Browse files
committed
Edits to README.OpenSSL
1 parent 485b478 commit 64be9e3

File tree

2 files changed

+20
-35
lines changed

2 files changed

+20
-35
lines changed

README.OpenSSL

Lines changed: 12 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
This "proposed update" to IndySockets/Indy adds support for OpenSSL 3.0 and
2-
later to Indy. Both Delphi and Lazarus/fpc are fully supported by this source code tree.
3-
4-
This provides a new (optional) OpenSSL package separate from Indy's "protocols" package
1+
This package provides a new (optional) OpenSSL package separate from Indy's "protocols" package
52
and adds support for OpenSSL 3.0 and later. Both Delphi and Lazarus/fpc are fully
63
supported by this source code tree.
74

@@ -17,6 +14,7 @@ behalf. If the call fails to load then it is replaced by a compatibility functio
1714
then an exception is raised. If an API function is allowed to be nil (as set in the template), then the function
1815
is loaded at library load time.
1916

17+
These updated package is dependent on Indy 10.7.
2018

2119
The updated package has been tested under the following scenarios:
2220

@@ -43,56 +41,38 @@ API calls may be used.
4341
Delphi Builds
4442
=============
4543

46-
All Protocols/IndyProtocolsnnn.dpk and dproj files have been edited to remove references to the moved files.
47-
However only Protocols/IndyProtocols290 has been tested (with Delphi Berlin edition).
48-
4944
New Packages:
5045

51-
IndyOpenSSL290 and
52-
dclIndyOpenSSL290 (design time only)
53-
54-
may be found in Lib\OpenSSL\.
46+
IndyTLSOpenSSL290 and
47+
dclIndyTLOSpenSSL290 (design time only)
5548

56-
These are dependent on IndyProtocols290 and dclIndyProtocols290,IndyOpenSSLLegacy290 respectively.
49+
may be found in the Delphi directory.
5750

58-
To use OpenSSL in a given project, the IndyOpenSSL290 package must now be included.
51+
To use OpenSSL in a given project, the IndyOpenSSL290 package must now be included in the list of required run time packages.
5952

60-
Lib\Indy290.groupproj has been updated to include the new packages in the project group.
61-
62-
icons\makedcr.bat has been updated to generate a .dcr package for the OpenSSL packages.
6353

6454
Lazarus/FPC Builds
6555
==================
6656

6757
All lazarus packages may be found in the "lazarus-fpc/" top level folder. These are:
6858

69-
indysystem.lpk
70-
indycore.lpk
71-
indyprotocols.lpk
72-
indyopenssl.lpk
59+
IndyTLSOpenSSL.lpk
7360

7461
and the design time only packages
7562

76-
indylaz.lpk
77-
indylaz_indyopenssl
63+
indylaz_openssl
7864

7965
In order to install this proposed update for Lazarus (Windows and Linux), Open first
80-
that package indylaz.lpk and click on install. Then Open the package indylaz_openssl.lpk and
81-
click on install. The Indy Library should now be available for use.
82-
83-
You can also use fpcmake to create a makefile for building the full package. Run
84-
85-
fpcmake -r
66+
that package indylaz_openssl.lpk and click on install. The Indy TLS Library should now be available for use.
8667

87-
in the package's root directiory.
8868

8969
Test Programs
9070
=============
9171

9272
Two test programs are available with variants for Delphi and Lazarus. These may be found in:
9373

94-
1. Test/OpenSSL/openssl-client and
95-
2. Test/OpenSSL/openssl-server.
74+
1. Test/openssl-client and
75+
2. Test/openssl-server.
9676

9777
openssl-client uses an HTTP Client to issue an http Get on an https target and returns
9878
the result. The server certificate is also verified.
@@ -105,7 +85,7 @@ directories.
10585

10686
Note that for Delphi, a convenience project group is provided:
10787

108-
Test\OpenSSL\OpenSSLTests.groupprog
88+
Test\AllTests.groupprog
10989

11090
These build both test programs and their supporting packages as a single project group. You do
11191
not have to install the design time packages in order to use the test programs.

src/opensslHdrs/IdSSLOpenSSLAPI.pas

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,8 @@ function TOpenSSLDynamicLibProvider.GetSSLLibVersions : string;
582582

583583
procedure TOpenSSLDynamicLibProvider.SetSSLLibVersions(AValue : string);
584584
begin
585-
UnLoad;
585+
if FSSLLibVersions <> AValue then
586+
UnLoad;
586587
FSSLLibVersions := AValue;
587588
end;
588589

@@ -593,7 +594,8 @@ function TOpenSSLDynamicLibProvider.GetSSLBaseLibName: string;
593594

594595
procedure TOpenSSLDynamicLibProvider.SetSSLBaseLibName(AValue: string);
595596
begin
596-
UnLoad;
597+
if FSSLBaseLibName <> AValue then
598+
UnLoad;
597599
FSSLBaseLibName := AValue;
598600
end;
599601

@@ -604,7 +606,8 @@ function TOpenSSLDynamicLibProvider.GetCryptoBaseLibName: string;
604606

605607
procedure TOpenSSLDynamicLibProvider.SetCryptoBaseLibName(AValue: string);
606608
begin
607-
UnLoad;
609+
if FCryptoBaseLibName <> AValue then
610+
UnLoad;
608611
FCryptoBaseLibName := AValue;
609612
end;
610613

@@ -616,6 +619,8 @@ function TOpenSSLDynamicLibProvider.GetAllowLegacyLibsFallback: boolean;
616619
procedure TOpenSSLDynamicLibProvider.SetAllowLegacyLibsFallback(AValue: boolean
617620
);
618621
begin
622+
if FAllowLegacyLibsFallback <> AValue then
623+
Unload;
619624
FAllowLegacyLibsFallback := AValue;
620625
end;
621626

0 commit comments

Comments
 (0)