Help with RoWinInetHttpChanel and SSL

(tlucityahoocom) #1


I have a server app that sends requests to multiple clients (up to 50 - every request in a separate thread).
The app uses ROIndyHttpServer/RoIndyHttpChanel. (Delphi Xe2 and RO V.
In a previous post because of an internal Indy error: - Project raised exception class EidClosedSocket with message ‘Disconected’ i was advised to replace Indy with WinInet or Synapse.
I want to rewrite the app and i have replaced Indy components with RoWinHttpServer/RoWinInetHttpChanel. I have registered the URL OnManualBindevent and added a new ssl certificate binding for the server port.


The server app seems to work ok.

The problem that i have is with the client app (RoWinInetHttpChanel).

i have added the following line:
self.ROWinInetHTTPChannel1.ClientCert.CertFile := extractFilePath(application.exename) + 'Client.crt';
but the problem is that i can replace ‘Client.crt’ with any other file and after i get this message

the server responds.

I’m sure that i am doing something wrong.

Thx a lot.

(EvgenyK) #2

have you set up SSL on server-side with netsh.exe ?

(tlucityahoocom) #3

Yes i have.

(EvgenyK) #4

try to specify more details on client-side like

  ROWinInetHTTPChannel1.ClientCert.CertFile :=  'test_b_crt.pem';
  ROWinInetHTTPChannel1.ClientCert.KeyFile :=  'key.pvk';
  ROWinInetHTTPChannel1.ClientCert.CertIssuer := '****';
  ROWinInetHTTPChannel1.ClientCert.CertName := '****';
  ROWinInetHTTPChannel1.ClientCert.CertSerial := 'f5 dc b5 57 a2 bd e2 85';