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

Method set_check_hostname

crates/stdlib/src/openssl.rs:1230–1236  ·  view source on GitHub ↗
(&self, ch: bool)

Source from the content-addressed store, hash-verified

1228 }
1229 #[pygetset(setter)]
1230 fn set_check_hostname(&self, ch: bool) {
1231 let mut ctx = self.builder();
1232 if ch && builder_as_ctx(&ctx).verify_mode() == SslVerifyMode::NONE {
1233 ctx.set_verify(SslVerifyMode::PEER | SslVerifyMode::FAIL_IF_NO_PEER_CERT);
1234 }
1235 self.check_hostname.store(ch);
1236 }
1237
1238 // PY_PROTO_MINIMUM_SUPPORTED = -2, PY_PROTO_MAXIMUM_SUPPORTED = -1
1239 #[pygetset]

Callers

nothing calls this directly

Calls 4

builder_as_ctxFunction · 0.85
builderMethod · 0.45
verify_modeMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected