After some search, I found that reqwest::ClientBuilder.add_root_certificate()
can be used to specify a certain self-signed certificate. To to this, a desired certificate is defined in compile time, or a user shall provide (a path of) the certificate and then the program shall read it.
However, what I want to do is that the program uses self-signed certificates installed on the OS (For example on Windows, double-clicking a self-signed certificate allows me to install it to the system) without a compile time hard-coded value or manual user input.
How do I achieve this?