Lines Matching refs:Ssl

546 static SESSION_CTX_INDEX: OnceCell<Index<Ssl, SslContext>> = OnceCell::new();
548 fn try_get_session_ctx_index() -> Result<&'static Index<Ssl, SslContext>, ErrorStack> {
549 SESSION_CTX_INDEX.get_or_try_init(Ssl::new_ex_index)
855 /// The callback is provided with a reference to the `Ssl` for the session, as well as a boolean
882 /// The callback is provided with a reference to the `Ssl` for the session, as well as a boolean
2194 /// `Ssl` objects are created from an [`SslContext`], which provides configuration defaults.
2195 /// These defaults can be overridden on a per-`Ssl` basis, however.
2198 pub struct Ssl;
2200 /// Reference to an [`Ssl`].
2202 /// [`Ssl`]: struct.Ssl.html
2206 impl fmt::Debug for Ssl {
2212 impl Ssl {
2218 pub fn new_ex_index<T>() -> Result<Index<Ssl, T>, ErrorStack>
2233 fn cached_ex_index<T>() -> Index<Ssl, T>
2242 .or_insert_with(|| Ssl::new_ex_index::<T>().unwrap().as_raw());
2247 /// Creates a new `Ssl`.
2253 pub fn new(ctx: &SslContextRef) -> Result<Ssl, ErrorStack> {
2257 let mut ssl = Ssl::from_ptr(ptr);
2271 /// `SslConnector` rather than `Ssl` directly, as it manages that configuration.
2290 /// `SslAcceptor` rather than `Ssl` directly, as it manages that configuration.
2305 fmt.debug_struct("Ssl")
2373 self.set_ex_data(Ssl::cached_ex_index(), Arc::new(verify));
2396 self.set_ex_data(Ssl::cached_ex_index(), Arc::new(callback));
2424 self.set_ex_data(Ssl::cached_ex_index(), Arc::new(callback));
2848 /// with the same `SslContext` as this `Ssl`.
2919 /// Determines if this `Ssl` is configured for server-side or client-side use.
2928 /// `Ssl::new_ex_index` method to create an `Index`.
2930 pub fn set_ex_data<T>(&mut self, index: Index<Ssl, T>, data: T) {
2943 pub fn ex_data<T>(&self, index: Index<Ssl, T>) -> Option<&T> {
2956 pub fn ex_data_mut<T>(&mut self, index: Index<Ssl, T>) -> Option<&mut T> {
3413 /// Returns a shared reference to the `Ssl` of the stream.
3456 ssl: ManuallyDrop<Ssl>,
3487 /// with the peer. If the `Ssl` was configured with [`SslRef::set_connect_state`] or
3492 pub fn new(ssl: Ssl, stream: S) -> Result<Self, ErrorStack> {
3514 note = "use Ssl::from_ptr and SslStream::new instead"
3517 let ssl = Ssl::from_ptr(ssl);
3579 /// `SslConnector` rather than `Ssl` directly, as it manages that configuration.
3595 /// `SslAcceptor` rather than `Ssl` directly, as it manages that configuration.
3742 ErrorCode::SSL => Some(InnerError::Ssl(ErrorStack::get())),
3748 Some(InnerError::Ssl(errs))
3792 /// Returns a shared reference to the `Ssl` object associated with this stream.
3841 note = "use the methods directly on Ssl/SslStream instead"
3853 pub fn new(ssl: Ssl, stream: S) -> Self {
3901 /// See `Ssl::connect`
3920 /// See `Ssl::accept`
4021 /// Returns a shared reference to the `Ssl` object associated with this builder.