-1

I am implementing a crawler, and to login to the system I will do the crawle, I need to inform what is the certificate that will be used to authenticate the user, ie is not informed a user and password, the certificate is the user and password.

Currently it is possible to enter the site using chrome, where the site uses the "chrome.certificateProvider" ( https://developer.chrome.com/extensions/certificateProvider ) component. In C#, how can I simulate this component, so that the crawler automatically selects the certificate?

1 Answers1

0

It sounds like you are trying to write an HTTPS client which uses TLS Client Certificate Authentication.

There are various different ways to do this in .NET depending on which of the many WebRequest-type classes you decide to use.

One option is to use the HttpWebRequest class. In here you set the ClientCertificates property MSDN to contain the client authentication certificate.

There are examples of the use of this in other StackOverflow questions such as Force HttpWebRequest to send client certificate

If you particularly want to go low-level, another option is to use the SslStream class, and implement your own HTTP code on top of this. MSDN

Hope this helps

Trevor
  • 1,251
  • 1
  • 9
  • 11