@@ -881,25 +881,41 @@ impl<H> Easy2<H> {
881
881
self . setopt_long ( curl_sys:: CURLOPT_PROXYPORT , port as c_long )
882
882
}
883
883
884
- /// Set CA certificate to verify peer against for proxy
884
+ /// Set CA certificate to verify peer against for proxy.
885
885
///
886
- /// By default this value is not set and corresponds to `CURLOPT_PROXY_CAINFO`.
886
+ /// By default this value is not set and corresponds to
887
+ /// `CURLOPT_PROXY_CAINFO`.
887
888
pub fn proxy_cainfo ( & mut self , cainfo : & str ) -> Result < ( ) , Error > {
888
889
let cainfo = CString :: new ( cainfo) ?;
889
890
self . setopt_str ( curl_sys:: CURLOPT_PROXY_CAINFO , & cainfo)
890
891
}
891
892
892
- /// Set client certificate for proxy
893
+ /// Specify a directory holding CA certificates for proxy.
894
+ ///
895
+ /// The specified directory should hold multiple CA certificates to verify
896
+ /// the HTTPS proxy with. If libcurl is built against OpenSSL, the
897
+ /// certificate directory must be prepared using the OpenSSL `c_rehash`
898
+ /// utility.
899
+ ///
900
+ /// By default this value is not set and corresponds to
901
+ /// `CURLOPT_PROXY_CAPATH`.
902
+ pub fn proxy_capath < P : AsRef < Path > > ( & mut self , path : P ) -> Result < ( ) , Error > {
903
+ self . setopt_path ( curl_sys:: CURLOPT_PROXY_CAPATH , path. as_ref ( ) )
904
+ }
905
+
906
+ /// Set client certificate for proxy.
893
907
///
894
- /// By default this value is not set and corresponds to `CURLOPT_PROXY_SSLCERT`.
908
+ /// By default this value is not set and corresponds to
909
+ /// `CURLOPT_PROXY_SSLCERT`.
895
910
pub fn proxy_sslcert ( & mut self , sslcert : & str ) -> Result < ( ) , Error > {
896
911
let sslcert = CString :: new ( sslcert) ?;
897
912
self . setopt_str ( curl_sys:: CURLOPT_PROXY_SSLCERT , & sslcert)
898
913
}
899
914
900
- /// Set private key for HTTPS proxy
915
+ /// Set private key for HTTPS proxy.
901
916
///
902
- /// By default this value is not set and corresponds to `CURLOPT_PROXY_SSLKEY`.
917
+ /// By default this value is not set and corresponds to
918
+ /// `CURLOPT_PROXY_SSLKEY`.
903
919
pub fn proxy_sslkey ( & mut self , sslkey : & str ) -> Result < ( ) , Error > {
904
920
let sslkey = CString :: new ( sslkey) ?;
905
921
self . setopt_str ( curl_sys:: CURLOPT_PROXY_SSLKEY , & sslkey)
0 commit comments