Cannot resolve certificate verification issue.
There is a web API server that uses HTTPS to process requests. The server certificate has this certification path: RCA (root) โ ICA (intermediate) โ web API server. RCA, ICA, and Web API servers are members of the same Active Directory domain.
The client application (desktop, computer is connected to the same domain) uses HttpClient to communicate with the server and supports two scenarios:
- connected to the corporate network;
- disconnected from the corporate network (Internet access).
Both scenarios use basic authentication.
RCA and ICA certificates are placed in the "trusted root certification authorities" and "Intermediate certification authorities" respectively for the local computer account. RCA certificate is self-signed.
Now that the client is connected to the corporate network, certificate verification works as expected, and the user can "talk" with the web API.
When the client is disconnected (only an Internet connection is available), certificate verification fails with an AuthenticationException ("The remote certificate is not valid according to the verification procedure").
I do not want to completely disable certificate verification, but I just need to tell the verification system that this certificate is valid. In addition, the client application uses SignalR, which by default uses its own transport. Therefore, this and this are not parameters.
Why doesn't placing RCA ICA certificates in the "Trusted ..." and "Intermediate ..." folders help?
Is there a workaround?
source share