Article View: borland.public.cppbuilder.internet.socket
Article #1826Re: Exception class EIdOSSLCouldNotLoadSSLLibrary (Indy 9.0.50)
From: Hans Galema
Date: Mon, 09 Oct 2006 14:40
Date: Mon, 09 Oct 2006 14:40
87 lines
3978 bytes
3978 bytes
Remy Lebeau (TeamB) wrote:
> You do not have the correct version of the OpenSSL DLLs installed. Which
> versions do you have installed? Where did you get them?
According to the article one of the url's where I could get them was
http://www.slproweb.com where I downloaded Win32OpenSSL-0_9_8d.exe.
There was another installer but this one was recommended. Explorer
tells the version of the .dll's is 0.9.8.4
I choosed for that one because I got it all at once: headers, lib and
dll's. (I neaded the headers and lib for the first exercise with
raw sockets. As mentioned that exercise went ok). So -on request- I
installed all in D:\OpenSSL but did not find the .dll's in it. It
appeared that this was one of such installers which ask you for a
destination directory and then copy a whole bunch of files to system32.
Searching for the mentioned .dlls I found them in directories for
FileZilla, php4 and php5. And in system32.
With the Indy example I only needed the .dll's.
So better get them from http://www.indyproject.org?
>>and added IdHTTP.pas to the project
>
> You should not have done that. You should have linked to the Indy library
> instead.
That I have to investigate further then.
> Do not call Connect() directly. Use Get() or Post() instead, which will
> call Connect() internally as needed.
I do not know what I should post or get. I merely followed the example
in the article. This is all the code:
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
AnsiString Host = "www.verisign.com";
int Port = 443;
IdHTTP = new TIdHTTP ( this );
IdSSLIOHandlerSocket = new TIdSSLIOHandlerSocket ( this );
IdHTTP->Host = Host;
IdHTTP->Port = Port;
IdHTTP->IOHandler = IdSSLIOHandlerSocket;
IdSSLIOHandlerSocket->SSLOptions->Mode = sslmClient;
IdSSLIOHandlerSocket->SSLOptions->Method = sslvSSLv23;
Label2->Caption = "Indy " + IdHTTP->Version;
// 9.0.50
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Memo1->Clear();
IdHTTP->Connect(); // this brings the exception
//'Could not load SSL library.'.
Memo1->Lines->Add (
IdSSLIOHandlerSocket->SSLSocket->PeerCert->Subject->OneLine );
Memo1->Lines->Add ( "" );
Memo1->Lines->Add (
IdSSLIOHandlerSocket->SSLSocket->PeerCert->FingerprintAsString);
}
>>Unfortunately the message does not tell which file/path could not be
>>found.
>
> The IdSSLOpenSSLHeaders unit has a WhichFailedToLoad() function that
> provides that information.
Now that is another problem as I do not know if I should instantiate an
instance of that class or that is is part of one of the classes I use here.
Googling for it brings that name used also in the builder groups but there
is not a single code example.
>>Are they libeay32.dll or ssleay32.dll?
> Yes.
I will first try to get these dll's from the indy website.
Hans.
Technical Details
Message-ID:
<452a5f9e@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<452638cc$1@newsgroups.borland.com> <4526ae80$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,997613c5798fd0ad X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Mon, 09 Oct 2006 16:40:37 +0200 From: Hans Galema <notused@notused.nl> User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: Exception class EIdOSSLCouldNotLoadSSLLibrary (Indy 9.0.50) References: <452638cc$1@newsgroups.borland.com> <4526ae80$1@newsgroups.borland.com> In-Reply-To: <4526ae80$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 145.98.201.248 Message-ID: <452a5f9e@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1160404894 145.98.201.248 (9 Oct 2006 07:41:34 -0700) Lines: 87 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail