Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement