bogdanfinn / tls-client

net/http.Client like HTTP Client with options to select specific client TLS Fingerprints to use for requests.
BSD 4-Clause "Original" or "Old" License
670 stars 133 forks source link

Add support for custom CA #41

Closed jsnjack closed 1 year ago

jsnjack commented 1 year ago

This pull request exposes RootCAs transport option to a user and allows the user to set their own root certificate bundle.

Motivation:

Details: In this pr I made RootCAs a part of TransportOptions struct, which makes sense because it is a transport option. However, a similar insecureSkipVerify option is assigned as HttpClientOption. Should RootCAs be also assigned in a similar way as insecureSkipVerify? :thinking:

bogdanfinn commented 1 year ago

@jsnjack thank you for the PR.

Not sure if it is more the other way around that the insecureSkipVerify should be assigned to TransportOptions struct. I will think about that.

jsnjack commented 1 year ago

Thanks!