File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -250,6 +250,9 @@ pub trait Handler {
250
250
/// By default this function calls an internal method and
251
251
/// corresponds to `CURLOPT_SSL_CTX_FUNCTION` and
252
252
/// `CURLOPT_SSL_CTX_DATA`.
253
+ ///
254
+ /// Note that this callback is not guaranteed to be called, not all versions
255
+ /// of libcurl support calling this callback.
253
256
fn ssl_ctx ( & mut self , cx : * mut c_void ) -> Result < ( ) , Error > {
254
257
drop ( cx) ;
255
258
Ok ( ( ) )
@@ -632,10 +635,8 @@ impl<H: Handler> Easy2<H> {
632
635
. expect ( "failed to set debug callback" ) ;
633
636
634
637
let cb: curl_sys:: curl_ssl_ctx_callback = ssl_ctx_cb :: < H > ;
635
- self . setopt_ptr ( curl_sys:: CURLOPT_SSL_CTX_FUNCTION , cb as * const _ )
636
- . expect ( "failed to set ssl ctx callback" ) ;
637
- self . setopt_ptr ( curl_sys:: CURLOPT_SSL_CTX_DATA , ptr)
638
- . expect ( "failed to set ssl ctx callback" ) ;
638
+ drop ( self . setopt_ptr ( curl_sys:: CURLOPT_SSL_CTX_FUNCTION , cb as * const _ ) ) ;
639
+ drop ( self . setopt_ptr ( curl_sys:: CURLOPT_SSL_CTX_DATA , ptr) ) ;
639
640
}
640
641
641
642
#[ cfg( all( unix, not( target_os = "macos" ) ) ) ]
You can’t perform that action at this time.
0 commit comments