mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Add SSLContext.options
This commit is contained in:
@@ -345,6 +345,15 @@ impl PySslContext {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
#[pyproperty]
|
||||
fn options(&self) -> libc::c_ulong {
|
||||
self.ctx.read().options().bits()
|
||||
}
|
||||
#[pyproperty(setter)]
|
||||
fn set_options(&self, opts: libc::c_ulong) {
|
||||
self.builder()
|
||||
.set_options(SslOptions::from_bits_truncate(opts));
|
||||
}
|
||||
#[pyproperty(setter)]
|
||||
fn set_verify_mode(&self, cert: i32, vm: &VirtualMachine) -> PyResult<()> {
|
||||
let mut ctx = self.builder();
|
||||
|
||||
Reference in New Issue
Block a user