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.
            Asked
            
        
        
            Active
            
        
            Viewed 619 times
        
    2
            
            
        
        kwl
        
- 495
 - 6
 - 13
 
1 Answers
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.