Skip to content

Commit

Permalink
address build failures
Browse files Browse the repository at this point in the history
* merge from main broken because context_mut is now unsafe
  • Loading branch information
jmayclin committed Feb 27, 2025
1 parent 31df9d9 commit 0d56cb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bindings/rust/extended/s2n-tls/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,11 @@ impl Builder {
}

let handler = Box::new(handler);
let context = self.config.context_mut();
let context = unsafe {
// SAFETY: usage of context_mut is safe in the builder, because while
// it is being built, the Builder is the only reference to the config.
self.config.context_mut()
};
context.psk_selection_callback = Some(handler);

unsafe {
Expand Down

0 comments on commit 0d56cb4

Please sign in to comment.