| View previous topic :: View next topic |
| Author |
Message |
Hamid Guest
|
Posted: Tue Apr 11, 2006 1:03 pm Post subject: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
I am using TIdSSLIOHandlerSocketOpenSSL and TIdHTTP to send some data to a server using Post method. When I set the IOHandler of the TIdHTTP an exception occurrs with the following message: "IOHandler value is not valid". How can I solve the problem? I am using BDS2006 with Indy10 and my code is:
outputXml = idHttp->Post("https://172.16.5.17:8443", inputXmlStream);
Thanx |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Apr 11, 2006 6:04 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
"Hamid" <hrz_mir (AT) Yahoo (DOT) com> wrote in message
news:443b9ab3$1 (AT) newsgroups (DOT) borland.com...
| Quote: | When I set the IOHandler of the TIdHTTP an exception occurrs
with the following message: "IOHandler value is not valid".
|
That error can only occur when calling Get() or Post() with an HTTPS URL
without first having an TIdSSLIOHandlerSocketOpenSSL assigned to the TIdHTTP
beforehand. Did you actually assign the TIdSSLIOHandlerSocketOpenSSL to the
TIdHTTP's IOHandler property?
Gambit |
|
| Back to top |
|
 |
Hamid Guest
|
Posted: Wed Apr 12, 2006 6:03 am Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
Yes, that was my mistake. But now new exception occurrs with this message: "Could not load SSL library.". My code is:
idHttp->IOHandler = idSSLIOHandlerSocketOpenSSL1;
Should I set some other settings before using SSL connection? |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Apr 12, 2006 11:03 am Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
"Hamid" <hrz_mir (AT) Yahoo (DOT) com> wrote in message
news:443c8ead$1 (AT) newsgroups (DOT) borland.com...
| Quote: | new exception occurrs with this message: "Could not load SSL library.".
|
Which version and build of Indy are you using? Which version of OpenSSL?
Gambit |
|
| Back to top |
|
 |
Colin B Maharaj Guest
|
Posted: Wed Apr 12, 2006 12:03 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
Hi Hamid, I did a little work with SSL and create a mini secure web server.
To get this working you need to get the correct DLLs that work With
Builder AND the version of Indy you are using.
I am using BCB6 Ent and Indy 9
For Indy to work, you need...
02/11/2003 10:18 AM 696,320 libeay32.dll
02/11/2003 10:18 AM 155,648 ssleay32.dll
2 File(s) 851,968 bytes
At least in my environment.
Place these DLL in the same path as your EXE.
Hamid wrote:
| Quote: | Yes, that was my mistake. But now new exception occurrs with this message: "Could not load SSL library.". My code is:
idHttp->IOHandler = idSSLIOHandlerSocketOpenSSL1;
Should I set some other settings before using SSL connection? |
|
|
| Back to top |
|
 |
Hamid Guest
|
Posted: Wed Apr 12, 2006 12:03 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
| Quote: | Which version and build of Indy are you using? Which version of OpenSSL?
I am using Indy 10.1.5. |
|
|
| Back to top |
|
 |
Hamid Guest
|
Posted: Wed Apr 12, 2006 1:03 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
Thanx Colin, Would you please let me know exactly from where you downloaded the Indy that you are using?
Thanx |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Apr 12, 2006 5:03 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
"Hamid" <hrz_mir (AT) Yahoo (DOT) com> wrote in message
news:443ce004$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I am using Indy 10.1.5.
|
You did not answer the second part of my question - which version of OpenSSL
are you using? Are you still using Indy's custom DLLs? If so, then I
suppose you did not know that the latest Indy 10 snapshot now uses the
standardized OpenSSL DLLs instead. The custom DLLs have become obsolete.
Gambit |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Apr 12, 2006 6:03 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
"Colin B Maharaj" <noreply (AT) myhost (DOT) com> wrote in message
news:443cdb9e$1 (AT) newsgroups (DOT) borland.com...
| Quote: | To get this working you need to get the correct DLLs that work With
Builder AND the version of Indy you are using.
I am using BCB6 Ent and Indy 9
|
To elaborate on that - older versions of Indy cannot use the standard
OpenSSL DLLs at all. You must download Indy's own custom builds of the
DLLs. You can find the download links at http://www.indyproject.org..
The current Indy 10 snapshot no longer uses the custom DLLs. Indy as
recently updated to finally use the standard OpenSSL DLLs now.
Gambit |
|
| Back to top |
|
 |
Hamid Guest
|
Posted: Sat Apr 15, 2006 6:03 am Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
I wondered that I could not find the files libeay32.dll and ssleay32.dll because I thought they were installed after installing BDS2006. Anyway I downloaded them from http://www.intelicom.si. Here is its readme file:
<<<<<<<<<<<<<<<<<<<<<<<<< Readme.txt >>>>>>>>>>>>>>>>>>>>>>>>>>
OpenSSL libraries for Indy
***********************************
Copyright 2000-2002,
Gregor Ibic, gregor.ibic (AT) intelicom (DOT) si
Intelicom d.o.o.
www.intelicom.si
This library is tested on Indy 9.0 and higher.
<<<<<<<<<<<<<<<<<<<<<<<<< Readme.txt >>>>>>>>>>>>>>>>>>>>>>>>>>
According to the readme file it should work with Indy 9.0 and higher. Now if I do not know if it will work after copying to WIN\System32 ?
I didn't see why this is not integrated with BDS2006?
Thanx, |
|
| Back to top |
|
 |
Hamid Guest
|
Posted: Sat Apr 15, 2006 6:03 am Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
I copied both files in WIN\system32 and apparently it is working. But new exception occurrs with the following message:
"Read Timeout" . Moreover, my server is in debug mode. I am tracing my codes.
My code:
idHttp->IOHandler = idSSLIOHandlerSocketOpenSSL1;
outputXml = idHttp->Post("https://domain.com", inputXmlStream);
thanx, |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Mon Apr 17, 2006 6:03 pm Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL |
|
|
"Hamid" <hrz_mir (AT) Yahoo (DOT) com> wrote in message
news:444080c1$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I wondered that I could not find the files libeay32.dll and ssleay32.dll
because I thought they were installed after installing BDS2006.
|
OpenSSL cannot be shipped with BDS (or Indy) due to export laws governing
encryption. That is why Indy's website offered download links to its custom
version of OpenSSL separately so that the DLLs could be obtained from a
third-party in another country where the laws do not apply.
As I told you earlier, the latest Indy 10.1.5 snapshot cannot use those
custom DLLs anymore. They are obsolete. It now uses the standard DLLs
provided by http://www.openssl.org itself.
| Quote: | I didn't see why this is not integrated with BDS2006?
|
Because, by law, it can't be.
Gambit |
|
| Back to top |
|
 |
|