Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Apr : INDY, SSL and VerifyPeer

www.cryer.info
Managed Newsgroup Archive

INDY, SSL and VerifyPeer

Subject:INDY, SSL and VerifyPeer
Posted by:"Pandore" (jn.gisbe..@free.fr)
Date:Thu, 28 Apr 2005 16:26:26

Hello,

I do my best to secure a tcp client-server application with SSL layer.
Indy components seem to be quite nice for this job. Everything works
fine until I try to use the OnVerifyPeer event.

My peace of code (client side) to activate it is :

   // the version of SSL which will be used
   SSLOptions.Method := sslvTLSv1;
   // activate the certificate verification
   OnVerifyPeer := DoOnVerifyPeer;
   with SSLOptions do
   begin
     VerifyMode := [sslvrfPeer];
     VerifyDepth := 3;
   end;

the DoOnVerifyPeer return true so the server's certificate is ok. But I
always have to deal with an EIdOSSLConnectError :/ The problem comes
from VerifyCallback(Ok: Integer; ctx: PX509_STORE_CTX) (a SSLeay dll
function in IdSSLOpenSSL). The Ok parameter is ALWAYS set to 0.

Is there anyone who could help me ? Thanks by advance :)

Nono

Replies:

www.cryer.info
Managed Newsgroup Archive