Get or create an ex_data index for msg_callback data
()
| 614 | |
| 615 | // Get or create an ex_data index for msg_callback data |
| 616 | fn get_msg_callback_ex_data_index() -> libc::c_int { |
| 617 | use rustpython_common::lock::LazyLock; |
| 618 | static MSG_CB_EX_DATA_IDX: LazyLock<libc::c_int> = LazyLock::new(|| unsafe { |
| 619 | sys::SSL_get_ex_new_index( |
| 620 | 0, |
| 621 | std::ptr::null_mut(), |
| 622 | None, |
| 623 | None, |
| 624 | Some(msg_callback_data_free), |
| 625 | ) |
| 626 | }); |
| 627 | *MSG_CB_EX_DATA_IDX |
| 628 | } |
| 629 | |
| 630 | // Free function for msg_callback data - called by OpenSSL when SSL is freed |
| 631 | unsafe extern "C" fn msg_callback_data_free( |
no test coverage detected