Skip to content

Commit

Permalink
Merge pull request #2237 from mspublic/boringssl-keylog
Browse files Browse the repository at this point in the history
Add boringssl keylog callback support
  • Loading branch information
alex committed May 7, 2024
2 parents daaca3f + 3b11656 commit 5095d7d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions openssl/src/ssl/callbacks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use std::ffi::CStr;
use std::mem;
use std::ptr;
use std::slice;
#[cfg(ossl111)]
#[cfg(any(ossl111, boringssl))]
use std::str;
use std::sync::Arc;

Expand All @@ -28,7 +28,7 @@ use crate::ssl::{
};
#[cfg(ossl111)]
use crate::ssl::{ClientHelloResponse, ExtensionContext};
#[cfg(ossl111)]
#[cfg(any(ossl111, boringssl))]
use crate::util::ForeignTypeRefExt;
#[cfg(ossl111)]
use crate::x509::X509Ref;
Expand Down Expand Up @@ -429,7 +429,7 @@ where
}
}

#[cfg(ossl111)]
#[cfg(any(ossl111, boringssl))]
pub unsafe extern "C" fn raw_keylog<F>(ssl: *const ffi::SSL, line: *const c_char)
where
F: Fn(&SslRef, &str) + 'static + Sync + Send,
Expand Down
2 changes: 1 addition & 1 deletion openssl/src/ssl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ impl SslContextBuilder {
///
/// Requires OpenSSL 1.1.1 or newer.
#[corresponds(SSL_CTX_set_keylog_callback)]
#[cfg(ossl111)]
#[cfg(any(ossl111, boringssl))]
pub fn set_keylog_callback<F>(&mut self, callback: F)
where
F: Fn(&SslRef, &str) + 'static + Sync + Send,
Expand Down

0 comments on commit 5095d7d

Please sign in to comment.