File tree Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Expand file tree Collapse file tree 4 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,8 @@ pub const CURLOPT_ISSUERCERT_BLOB: CURLoption = CURLOPTTYPE_BLOB + 295;
607607
608608pub const CURLOPT_AWS_SIGV4 : CURLoption = CURLOPTTYPE_OBJECTPOINT + 305 ;
609609
610+ pub const CURLOPT_CAINFO_BLOB : CURLoption = CURLOPTTYPE_BLOB + 309 ;
611+
610612pub const CURL_IPRESOLVE_WHATEVER : c_int = 0 ;
611613pub const CURL_IPRESOLVE_V4 : c_int = 1 ;
612614pub const CURL_IPRESOLVE_V6 : c_int = 2 ;
Original file line number Diff line number Diff line change @@ -1003,6 +1003,11 @@ impl Easy {
10031003 self . inner . key_password ( password)
10041004 }
10051005
1006+ /// Same as [`Easy2::ssl_cainfo_blob`](struct.Easy2.html#method.ssl_cainfo_blob)
1007+ pub fn ssl_cainfo_blob ( & mut self , blob : & [ u8 ] ) -> Result < ( ) , Error > {
1008+ self . inner . ssl_cainfo_blob ( blob)
1009+ }
1010+
10061011 /// Same as [`Easy2::ssl_engine`](struct.Easy2.html#method.ssl_engine)
10071012 pub fn ssl_engine ( & mut self , engine : & str ) -> Result < ( ) , Error > {
10081013 self . inner . ssl_engine ( engine)
Original file line number Diff line number Diff line change @@ -2073,6 +2073,18 @@ impl<H> Easy2<H> {
20732073 self . setopt_str ( curl_sys:: CURLOPT_KEYPASSWD , & password)
20742074 }
20752075
2076+ /// Set the SSL Certificate Authorities using an in-memory blob.
2077+ ///
2078+ /// The specified byte buffer should contain the binary content of one
2079+ /// or more PEM-encoded CA certificates, which will be copied into
2080+ /// the handle.
2081+ ///
2082+ /// By default this option is not set and corresponds to
2083+ /// `CURLOPT_CAINFO_BLOB`.
2084+ pub fn ssl_cainfo_blob ( & mut self , blob : & [ u8 ] ) -> Result < ( ) , Error > {
2085+ self . setopt_blob ( curl_sys:: CURLOPT_CAINFO_BLOB , blob)
2086+ }
2087+
20762088 /// Set the SSL engine identifier.
20772089 ///
20782090 /// This will be used as the identifier for the crypto engine you want to
Original file line number Diff line number Diff line change @@ -66,6 +66,7 @@ fn main() {
6666 if version < 77 {
6767 match s {
6868 "CURLVERSION_TENTH"
69+ | "CURLOPT_CAINFO_BLOB"
6970 | "CURLVERSION_NOW"
7071 | "CURL_VERSION_ALTSVC"
7172 | "CURL_VERSION_ZSTD"
You can’t perform that action at this time.
0 commit comments