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

Method set_ciphers

crates/stdlib/src/openssl.rs:1048–1056  ·  view source on GitHub ↗
(&self, cipherlist: PyStrRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1046
1047 #[pymethod]
1048 fn set_ciphers(&self, cipherlist: PyStrRef, vm: &VirtualMachine) -> PyResult<()> {
1049 let ciphers = cipherlist.as_str();
1050 if ciphers.contains('\0') {
1051 return Err(exceptions::cstring_error(vm));
1052 }
1053 self.builder()
1054 .set_cipher_list(ciphers)
1055 .map_err(|_| new_ssl_error(vm, "No cipher can be selected."))
1056 }
1057
1058 #[pymethod]
1059 fn get_ciphers(&self, vm: &VirtualMachine) -> PyResult<PyListRef> {

Callers

nothing calls this directly

Calls 6

cstring_errorFunction · 0.85
new_ssl_errorFunction · 0.85
ErrClass · 0.50
as_strMethod · 0.45
containsMethod · 0.45
builderMethod · 0.45

Tested by

no test coverage detected