Remote certificate was verified as invalid by the user Remote certificate was verified as invalid by the user azure azure

Remote certificate was verified as invalid by the user


Are you providing a ServerCertificateValidationCallback anywhere else in your code?

We had a logical flaw in a callback that we implemented which was whitelisting specified domains with self-signed certificates. Namely, the callback was always executing - even for valid certificates - but only applying the whitelisting logic. Because legitimate certificates weren't in this list, the callback was indicating failure.

This was resolved by returning early based on the error variable:

if (error == SslPolicyErrors.None) return true;