BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using TIdSSLIOHandlerSocketOpenSSL

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
Hamid
Guest





PostPosted: Tue Apr 11, 2006 1:03 pm    Post subject: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote



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





PostPosted: Tue Apr 11, 2006 6:04 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote



"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





PostPosted: Wed Apr 12, 2006 6:03 am    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with 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
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Apr 12, 2006 11:03 am    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

"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





PostPosted: Wed Apr 12, 2006 12:03 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

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





PostPosted: Wed Apr 12, 2006 12:03 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

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





PostPosted: Wed Apr 12, 2006 1:03 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

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





PostPosted: Wed Apr 12, 2006 5:03 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

"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





PostPosted: Wed Apr 12, 2006 6:03 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

"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





PostPosted: Sat Apr 15, 2006 6:03 am    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

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





PostPosted: Sat Apr 15, 2006 6:03 am    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

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





PostPosted: Mon Apr 17, 2006 6:03 pm    Post subject: Re: Using TIdSSLIOHandlerSocketOpenSSL Reply with quote

"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.

Quote:
Anyway I downloaded them from http://www.intelicom.si.

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.