1

I have a tomcat server configured to use TLS and client certificate authentication optionally.

Currently I am trying to establish a connection using Inno Setup with WinHttpRequest:

WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
WinHttpReq.Open('POST', 'https://localhost:8443/api/validate', False);
WinHttpReq.Option(4) := '&H3300';

HTTPS errors are ignored; but receive this error message since I'm not setting any certificate for client validation:

A certificate is required to complete client authentication

So, what should I do to tell WinHttpReq that I don't have any certificate and continue?

I have tried using WinHttpSetOption:

WinHttpSetOption(WinHttpReq, WINHTTP_OPTION_CLIENT_CERT_CONTEXT, WINHTTP_NO_CLIENT_CERT_CONTEXT, 0);

But it is not an Inno Setup Pascal scripting valid function.

Thanks in advance.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
iperezmel78
  • 415
  • 5
  • 20

0 Answers0