How can I get peername or information on host's certificate when I use 
thttpsend with ssl?
I have tried:

   HTTP := THTTPSend.Create;
   HTTP.Protocol:='1.1' ;
     //http.Sock.SSL.OnVerifyCert:=mytestmethod; this did not get called
   Http.Sock.CreateWithSSL(TSSLOpenSSL);
   HTTP.Sock.SSL.VerifyCert:=true;
   HTTP.Sock.SSL.CertCAFile:='/mycerts/cacert.pem';
   Http.Sock.SSLDoConnect;
   log( 
'HTTP.Sock.SSL.GetPeerName+'!'+HTTP.Sock.SSL.Certificate+'/'+HTTP.Sock.SSL.GetCertInfo);
   Resultb := HTTP.HTTPMethod('GET', urli);
log(HTTP.Sock.SSL.GetPeerName+'!'+HTTP.Sock.SSL.Certificate+'/'+HTTP.Sock.SSL.GetCertInfo);

But the log-lines have no info. Otherwise it works fine (retrieves the 
content).

I can trace the calls to getpeername -> TSSLOpenSSL.GetPeerSubject (line 
713) where
  "if not assigned(FSsl) then  begin    Result := '';   Exit;    "
produces the empty string.

FPC on Ubuntu (recent versions). httpsend.pas starts: "| Project : 
Ararat Synapse    | 003.012.006 |
  -TImo

------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to