(&self)
| 2720 | |
| 2721 | #[pymethod] |
| 2722 | fn selected_alpn_protocol(&self) -> Option<String> { |
| 2723 | #[cfg(ossl102)] |
| 2724 | { |
| 2725 | // Use thread-local SSL pointer during handshake to avoid deadlock |
| 2726 | let ssl_ptr = get_ssl_ptr_for_context_change(&self.connection); |
| 2727 | unsafe { |
| 2728 | let mut out: *const libc::c_uchar = core::ptr::null(); |
| 2729 | let mut outlen: libc::c_uint = 0; |
| 2730 | |
| 2731 | sys::SSL_get0_alpn_selected(ssl_ptr, &mut out, &mut outlen); |
| 2732 | |
| 2733 | if out.is_null() { |
| 2734 | None |
| 2735 | } else { |
| 2736 | let slice = std::slice::from_raw_parts(out, outlen as usize); |
| 2737 | Some(String::from_utf8_lossy(slice).into_owned()) |
| 2738 | } |
| 2739 | } |
| 2740 | } |
| 2741 | #[cfg(not(ossl102))] |
| 2742 | { |
| 2743 | None |
| 2744 | } |
| 2745 | } |
| 2746 | |
| 2747 | #[pymethod] |
| 2748 | fn get_channel_binding( |
nothing calls this directly
no test coverage detected