◐ Shell
reader mode source ↗
Skip to content
Merged
Changes from all commits
File filter
Conversations
Jump to
Diff view
Apply and reload
Show whitespace
Diff view
Apply and reload
24 changes: 21 additions & 3 deletions crates/stdlib/src/ssl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3503,9 +3503,9 @@ mod _ssl {
}

// Check if connection has been shut down
// After unwrap()/shutdown(), read operations should fail with SSLError
let shutdown_state = *self.shutdown_state.lock();
if shutdown_state != ShutdownState::NotStarted {
return Err(vm
.new_os_subtype_error(
PySSLError::class(&vm.ctx).to_owned(),
Expand Down Expand Up @@ -3677,7 +3677,8 @@ mod _ssl {
}

// Check shutdown state
if *self.shutdown_state.lock() != ShutdownState::NotStarted {
return Err(vm
.new_os_subtype_error(
PySSLError::class(&vm.ctx).to_owned(),
Expand Up @@ -4138,6 +4139,8 @@ mod _ssl {
}
}

*self.shutdown_state.lock() = ShutdownState::Completed;
*self.connection.lock() = None;
return Ok(self.sock.clone());
Expand Down Expand Up @@ -4399,6 +4402,21 @@ mod _ssl {
}
}

// MemoryBIO - provides in-memory buffer for SSL/TLS I/O
#[pyattr]
#[pyclass(name = "MemoryBIO", module = "ssl")]
Expand Down
Loading
Toggle all file notes Toggle all file annotations