Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion boring/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2900,8 +2900,13 @@ impl Ssl {
}
}

/// Returns the process-wide extra data index associated with `T`.
///
/// The index is allocated lazily on first use and reused by subsequent calls for the same
/// type. Callers must coordinate all uses of a given `T`, since they share one slot on every
/// [`Ssl`].
// FIXME should return a result?
fn cached_ex_index<T>() -> Index<Ssl, T>
pub fn cached_ex_index<T>() -> Index<Ssl, T>
where
T: 'static + Sync + Send,
{
Expand Down
2 changes: 0 additions & 2 deletions hyper-boring/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ default = ["boring/default", "tokio-boring/default"]
fips = ["boring/fips", "tokio-boring/fips"]

[dependencies]
antidote = { workspace = true }
http = { workspace = true }
hyper = { workspace = true }
hyper-util = { workspace = true, features = ["client", "client-legacy"] }
linked_hash_set = { workspace = true }
boring = { workspace = true, default-features = false }
tokio = { workspace = true }
tokio-boring = { workspace = true, default-features = false }
Expand Down
100 changes: 0 additions & 100 deletions hyper-boring/src/cache.rs

This file was deleted.

12 changes: 0 additions & 12 deletions hyper-boring/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
//! Hyper SSL support via BoringSSL.
#![warn(missing_docs)]

use crate::cache::SessionKey;
use boring::error::ErrorStack;
use boring::ex_data::Index;
use boring::ssl::Ssl;
use std::fmt;
use std::sync::LazyLock;
use tokio_boring::SslStream;

mod cache;
mod v1;

pub use self::v1::*;

fn key_index() -> Result<Index<Ssl, SessionKey>, ErrorStack> {
static IDX: LazyLock<Result<Index<Ssl, SessionKey>, ErrorStack>> =
LazyLock::new(Ssl::new_ex_index);
IDX.clone()
}

/// Settings for [`HttpsLayer`]
pub struct HttpsLayerSettings {
session_cache_capacity: usize,
Expand Down
Loading
Loading