Skip to content

Commit

Permalink
mark items as pub(crate) to allow for separate renegotiate module
Browse files Browse the repository at this point in the history
  • Loading branch information
jmayclin committed Feb 18, 2025
1 parent 9717c3a commit 8949fae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bindings/rust/extended/s2n-tls/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Config {
/// SAFETY: There must only ever by mutable reference to `Context` alive at
/// any time. Configs can be shared across threads, so this method is
/// likely not correct for your usecase.
unsafe fn context_mut(&mut self) -> &mut Context {
pub(crate) unsafe fn context_mut(&mut self) -> &mut Context {
let mut ctx = core::ptr::null_mut();
s2n_config_get_ctx(self.as_mut_ptr(), &mut ctx)
.into_result()
Expand Down Expand Up @@ -173,7 +173,7 @@ impl Drop for Config {
}

pub struct Builder {
config: Config,
pub(crate) config: Config,
load_system_certs: bool,
enable_ocsp: bool,
}
Expand Down
4 changes: 2 additions & 2 deletions bindings/rust/extended/s2n-tls/src/renegotiate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ impl Connection {

// We trigger the callback last so that the application can modify any
// preserved configuration (like the server name or waker) if necessary.
if let Some(mut config) = self.config() {
if let Some(callback) = config.context_mut().renegotiate.as_mut() {
if let Some(config) = self.config() {
if let Some(callback) = config.context().renegotiate.as_ref() {
callback.on_renegotiate_wipe(self)?;
}
}
Expand Down

0 comments on commit 8949fae

Please sign in to comment.