MCPcopy Index your code
hub / github.com/RustPython/RustPython / get_sni_ex_data_index

Function get_sni_ex_data_index

crates/stdlib/src/openssl.rs:572–584  ·  view source on GitHub ↗

Get or create an ex_data index for SNI callback data

()

Source from the content-addressed store, hash-verified

570
571 // Get or create an ex_data index for SNI callback data
572 fn get_sni_ex_data_index() -> libc::c_int {
573 use rustpython_common::lock::LazyLock;
574 static SNI_EX_DATA_IDX: LazyLock<libc::c_int> = LazyLock::new(|| unsafe {
575 sys::SSL_get_ex_new_index(
576 0,
577 std::ptr::null_mut(),
578 None,
579 None,
580 Some(sni_callback_data_free),
581 )
582 });
583 *SNI_EX_DATA_IDX
584 }
585
586 // Free function for callback data
587 // NOTE: We don't free the data here because it's managed manually in do_handshake

Callers 4

cleanup_sni_ex_dataFunction · 0.85
_servername_callbackFunction · 0.85
_wrap_socketMethod · 0.85
_wrap_bioMethod · 0.85

Calls 2

newFunction · 0.85
SomeClass · 0.50

Tested by

no test coverage detected