Lines Matching defs:SslContext

145     /// Options controlling the behavior of an `SslContext`.
283 /// Options controlling the behavior of an `SslContext`.
331 /// A type specifying the kind of protocol an `SslContext` will speak.
546 static SESSION_CTX_INDEX: OnceCell<Index<Ssl, SslContext>> = OnceCell::new();
548 fn try_get_session_ctx_index() -> Result<&'static Index<Ssl, SslContext>, ErrorStack> {
705 /// A builder for `SslContext`s.
706 pub struct SslContextBuilder(SslContext);
726 SslContextBuilder(SslContext::from_ptr(ctx))
754 self.set_ex_data(SslContext::cached_ex_index::<F>(), verify);
778 let arg = self.set_ex_data_inner(SslContext::cached_ex_index::<F>(), callback);
864 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
895 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1268 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1331 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1355 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1387 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1411 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1425 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1442 /// The returned `SslSession` must not be associated with a different `SslContext`.
1448 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1466 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1494 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1517 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1536 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1552 self.set_ex_data(SslContext::cached_ex_index::<F>(), callback);
1560 /// `SslContext::new_ex_index` method to create an `Index`.
1562 pub fn set_ex_data<T>(&mut self, index: Index<SslContext, T>, data: T) {
1566 fn set_ex_data_inner<T>(&mut self, index: Index<SslContext, T>, data: T) -> *mut c_void {
1607 self.set_ex_data(SslContext::cached_ex_index::<AddFn>(), add_cb);
1608 self.set_ex_data(SslContext::cached_ex_index::<ParseFn>(), parse_cb);
1656 let ptr = self.set_ex_data_inner(SslContext::cached_ex_index::<F>(), callback);
1711 /// Consumes the builder, returning a new `SslContext`.
1712 pub fn build(self) -> SslContext {
1723 /// Applications commonly configure a single `SslContext` that is shared by all of its
1725 pub struct SslContext;
1727 /// Reference to [`SslContext`]
1729 /// [`SslContext`]: struct.SslContext.html
1733 impl Clone for SslContext {
1740 type Owned = SslContext;
1745 SslContext::from_ptr(self.as_ptr())
1751 impl fmt::Debug for SslContext {
1753 write!(fmt, "SslContext")
1757 impl SslContext {
1758 /// Creates a new builder object for an `SslContext`.
1768 pub fn new_ex_index<T>() -> Result<Index<SslContext, T>, ErrorStack>
1783 fn cached_ex_index<T>() -> Index<SslContext, T>
1792 .or_insert_with(|| SslContext::new_ex_index::<T>().unwrap().as_raw());
1799 /// Returns the certificate associated with this `SslContext`, if present.
1811 /// Returns the private key associated with this `SslContext`, if present.
1841 pub fn ex_data<T>(&self, index: Index<SslContext, T>) -> Option<&T> {
1868 /// `SslContext` than this one.
1881 /// `SslContext` than this one.
2194 /// `Ssl` objects are created from an [`SslContext`], which provides configuration defaults.
2197 /// [`SslContext`]: struct.SslContext.html
2547 /// Like [`SslContext::certificate`].
2556 /// Like [`SslContext::private_key`].
2558 /// [`SslContext::private_key`]: struct.SslContext.html#method.private_key
2848 /// with the same `SslContext` as this `Ssl`.