Guest User

Untitled

a guest
Aug 19th, 2019
61
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