2

I understand I can do certificate pinning using ServicePointManager.ServerCertificateValidationCallback on a global scope. All calls to TLS sites will use this callback for checking the certificate. How can I set a certificate validation callback on a per-call basis? I would like to only do certificate pinning for some sites.

kwl
  • 495
  • 6
  • 13

1 Answers1

1

As per https://stackoverflow.com/a/3795952/626761:

As a dirty workaround, you could try executing the sites that require a different security protocol in a new appdomain. Static instances are per appdomain, so that should give you the isolation you need.

Community
  • 1
  • 1
nodots
  • 1,450
  • 11
  • 19