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

Method set_ciphers

crates/stdlib/src/ssl.rs:1504–1517  ·  view source on GitHub ↗
(&self, ciphers: PyUtf8StrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1502
1503 #[pymethod]
1504 fn set_ciphers(&self, ciphers: PyUtf8StrRef, vm: &VirtualMachine) -> PyResult<()> {
1505 let cipher_str = ciphers.as_str();
1506
1507 // Parse cipher string and store selected ciphers
1508 let selected_ciphers = parse_cipher_string(cipher_str).map_err(|e| {
1509 vm.new_os_subtype_error(PySSLError::class(&vm.ctx).to_owned(), None, e)
1510 .upcast()
1511 })?;
1512
1513 // Store in context
1514 *self.selected_ciphers.write() = Some(selected_ciphers);
1515
1516 Ok(())
1517 }
1518
1519 #[pymethod]
1520 fn get_ciphers(&self, vm: &VirtualMachine) -> PyResult<PyListRef> {

Callers 15

seclevel_workaroundFunction · 0.45
test_wrap_socketFunction · 0.45
test_ciphersMethod · 0.45
test_get_ciphersMethod · 0.45
__init__Method · 0.45
try_protocol_comboFunction · 0.45
test_ecc_certMethod · 0.45
test_dual_rsa_eccMethod · 0.45
test_dh_paramsMethod · 0.45
test_ecdh_curveMethod · 0.45
test_shared_ciphersMethod · 0.45

Calls 7

parse_cipher_stringFunction · 0.85
upcastMethod · 0.80
new_os_subtype_errorMethod · 0.80
SomeClass · 0.50
as_strMethod · 0.45
to_ownedMethod · 0.45
writeMethod · 0.45

Tested by 14

seclevel_workaroundFunction · 0.36
test_wrap_socketFunction · 0.36
test_ciphersMethod · 0.36
test_get_ciphersMethod · 0.36
__init__Method · 0.36
try_protocol_comboFunction · 0.36
test_ecc_certMethod · 0.36
test_dual_rsa_eccMethod · 0.36
test_dh_paramsMethod · 0.36
test_ecdh_curveMethod · 0.36
test_shared_ciphersMethod · 0.36