SHARE
TWEET

Untitled

a guest Aug 19th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WebRequestHandler handler = new WebRequestHandler();
  2. handler.ServerCertificateCustomValidationCallback += (sender, certificate, chain, errors) => true;
  3. using (HttpClient client = new HttpClient(handler)) {
  4.      //Code goes here
  5. }
  6.      
  7. X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine);
  8. store.Open(OpenFlags.ReadOnly);
  9. X509Certificate2Collection collection = store.Certificates;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top