Jump to content
deonvn

Installing Latest Indy in Delphi XE2 (Update 4)

Recommended Posts

I am trying to upgrade to the latest version of Indy in Delphi XE2 (Update 4) (because a legacy program needs support for TLS1.2).

I have downloaded the latest Indy source from GitHub and have compiled and installed the packages.

I am now following the update instructions for XE2 as described in the Indy Wiki, specifically the instructions for modifying and recompiling IndyPeerImpl.pas as described by Remy Lebeau in this thread: http://www.codenewsfast.com/cnf/article/1430996872/permalink.art-ng1921q9582

I have made all the changes described in that thread but am now stuck on the very last instruction, which states that Indy's TPasswordEvent type was changed to use UnicodeString instead of AnsiString, so the TIPTestServerPeer.TOnGetPassword class and the TIdServerIOHandlerSSLOpenSSLPeer.LOnGetPassword() event handler "will have to be updated accordingly".

I have changed the relevant parts of TIPTestServerPeer.TOnGetPassword from AnsiString to String without any obvious issues.

However, when I change TIdServerIOHandlerSSLOpenSSLPeer.LOnGetPassword() to use String instead of AnsiString I get an error because FOnGetPassEvent still uses AnsiString.

FOnGetPassEvent is of type TPasswordEventPeer which is implemented in IPPeerAPI with an AnsiString parameter.

 

image.thumb.png.69193340b1a73a5954237a6b24b3ddcc.png

 

Does anyone have any idea how to get around this? I'm not sure what exactly I need to change in IndyPeerImpl.pas to get this to compile.

 

Any advice would be greatly appreciated.

 

Thanks in advance.

 

 

Share this post


Link to post
14 hours ago, deonvn said:

FOnGetPassEvent is of type TPasswordEventPeer which is implemented in IPPeerAPI with an AnsiString parameter.

...

Does anyone have any idea how to get around this? I'm not sure what exactly I need to change in IndyPeerImpl.pas to get this to compile.

Can't you just update the declaration of TPasswordEventPeer in IPPeerAPI.pas?

 

FYI, at some point in a later version, Embarcadero changed TPasswordEventPeer again, to use TStringBuilder instead of String (why? I have no idea!).

Share this post


Link to post

Hi Remy

 

It doesn't look like XE2 Professional included the IPPeerAPI.pas source file.

 

C:\Program Files (x86)\Embarcadero\Rad Studio\9.0\source\indy\abstraction folder doesn't exist.

C:\Program Files (x86)\Embarcadero\Rad Studio\9.0\source\indy\implementation only contains IndyPeerImpl.pas

C:\Program Files (x86)\Embarcadero\Rad Studio\9.0\source\lib\win32\debug and ...release each contain a copy of IPPeerAPI.dcu

 

I have searched the entire hard drive but no luck. It doesn't look like I have the XE2 source file for IPPeerAPI.pas, and I have no clue how to get a hold of it.

 

Perhaps I can try installing XE3 or XE4 and see if the ...source\indy\abstraction\IPPeerAPI.pas files were included there. If I'm lucky they might not have changed from XE2.

 

Thanks

Edited by deonvn

Share this post


Link to post

Do you NEED to recompile the IPPeerAPI abstraction layer, though?  Are you actually using any Embarcadero techs (DataSnap, etc) that are affected by updating the main Indy library?

Share this post


Link to post

Hi Remy

 

I'm not using DataSnap (not sure what other Embarcadero techs rely on Indy), so perhaps you are right. I might not need to recompile the abstraction layer at all.

 

I'll do some testing and see if I can get away with it.

 

Thanks for the advice.

 

Regards,

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×