Handle SEC_E_INCOMPLETE_CREDENTIALS errors when dealing with client certificates
Brought to you by:
apnadkarni
If the server requests a client certificate and we have not supplied one in the tls_socket call, it will fail with the SEC_E_INCOMPLETE_CREDENTIALS error. As per http://microsoft.public.platformsdk.security.narkive.com/rfIzFsJ7/schannel-and-client-certificates, it should be handled as follows:
When the SEC_E_INCOMPLETE_CREDENTIALS error is returned from
InitializeSecurityContext, your client code can do one of two things.
Anonymous
The second option implemented in 4.3.6. The first is pending.