Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Bob Swart (aka Drs.Bob) Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
View Bob Swart's profile on LinkedIn Drs.Bob's Delphi Notes
These are the voyages using Delphi Enterprise (and Architect). Its mission: to explore strange, new worlds. To design and build new applications. To boldly go...
Title:

64-bit DataSnap and RSA + PC1 filters

Author: Bob Swart
Posted: 11/11/2011 5:11:11 PM (GMT+1)
Content:

The following is also documented in my upcoming Delphi XE2 DataSnap book, but I want to share it with all Delphi XE2 DataSnap users already: DataSnap relies on OpenSSL for the encryption of the keys in the RSA + PC1 filter combination; which requires some manual assembly for 64-bit applications.

If you deploy 32-bit DataSnap servers, using the RSA and PC1 filters, then you must also deploy two Indy specific OpenSSL DLLs: libeay32.dll and ssleay32.dll – or make sure they already exist somewhere in the path of the server machine. These two DLLs are needed for the RSA filter (which encrypts the password used by the PC1 filter). Without these two DLLs, any client who wants to connect to the server will get an “Connection Closed Gracefully” message, because the server was unable to load the two DLLs to start the RSA filter to encrypt the PC1 keys, etc.

When Delphi is installed, three 32-bit versions of the OpenSLL DLLs can be found on your machine (actually all three slightly different):

C:\Program Files\CollabNet
C:\Program Files\Embarcadero\RAD Studio\9.0\bin\SubVersion
C:\Program Files\FinalBuilder 7 XE2

Even on a 64-bit Windows machine, I could find no 64-bit version of OpenSSL, other than on the OpenSSL site. So, I had to look for them on the internet ;-)
You can find the 64-bit version of OpenSSL 0.9.8g for Windows for the AMD64 instruction set as AMD64-Win64OpenSSL-0_9_8g.zip. This includes the .LIB and .EXP files plus headers from the inc32 directory.
In this AMD64-Win64OpenSSL-0_9_8g.zip file, you'll also find libeay32.dll and ssleay32.dll. Note that these are 64-bit versions of the OpenSLL DLLs, having the same name as the 32-bit counterparts. Make sure they do not end up in your 32-bit Windows directory. In fact, you may want to make sure that they are in the directory of your 64-bit DataSnap Server and/or 64-bit DataSnap Client only.

In the next couple of week I'm going to demonstrate this at the BE Delphi Developer Day on November 17th in Edegem (B), and my DataSnap XE2 training on November 25th in Helmond Brandevoort (NL), still one place left! Here, I'll also show the RSA and PC1 filters in action on Mac OS X clients, among others.

Back  


9 Comments

AuthorPostedComments
Mario Vermeulen 11/11/11 18:21:52Thanks Bob
Mario Vermeulen 11/11/11 18:22:21Wish I could be there(at Brandevoort that is)
Bruce McGee 11/11/11 19:26:36Any eta on the DataSnap book?
Bob Swart 11/11/11 21:16:47Bruce: the last edition of the DataSnap XE PDF should be finished tomorrow, and sent out on Sunday. The XE2 book is already being worked on, and will be used for the training on November 25th, and released in first edition the week thereafter (sent to all customers of the DataSnap XE book that). I'll wait until the second edition before posting it on Lulu.com as well (like last time).
If you buy the DataSnap XE PDF now from http://www.ebob42.com/courseware you will get updates until the end of 2012, which include the XE2 editions as well.
Bob Swart 11/11/11 22:05:57Also reported as QC #100968 now http://qc.embarcadero.com/wc/qcmain.aspx?d=100968
Luigi D. Sandon 11/11/11 22:54:519.8g has known security issues. You can find a better mantained Win32 and Win64 OpenSSL build here: http://www.slproweb.com/products/Win32OpenSSL.html. Anyway, avoid unknown algorithms like PC1. If noone uses it but Delphi, there is a reason...
Luigi D. Sandon 11/11/12 18:39:12There are also latest releases compiled to be used with Indy (no VC++ runtime) here: http://indy.fulgan.com/SSL/
Bob Swart 11/11/12 23:28:33Thank you very much Luigi D. Sandon for your feedback and suggestions! I'll make sure to mention the URL http://indy.fulgan.com/SSL/ in my courseware manual as well (and will also amend the QC report).
Allen N. 13/04/25 20:24:41I downloaded the latest 64bit .dll's. When the client starts and tries to connect to the datasnap server I get the following message: "...raised exception class TDBXError with message 'error:0d07207B:asn1 encoding routines:func(114):reason(123). Any idea what this error means? I'm compiling and running a 32 bit application on 64bit Windows 7. ...thanks.


New Comment (max. 2048 characters, no HTML):

Name:
Comment:



This webpage © 2005-2019 by Bob Swart (aka Dr.Bob - www.drbob42.com). All Rights Reserved.