(&self, vm: &VirtualMachine)
| 4434 | |
| 4435 | #[pymethod] |
| 4436 | fn shared_ciphers(&self, vm: &VirtualMachine) -> Option<PyListRef> { |
| 4437 | // Return None for client-side sockets |
| 4438 | if !self.server_side { |
| 4439 | return None; |
| 4440 | } |
| 4441 | |
| 4442 | // Check if handshake completed |
| 4443 | if !*self.handshake_done.lock() { |
| 4444 | return None; |
| 4445 | } |
| 4446 | |
| 4447 | // Get negotiated cipher suite from rustls |
| 4448 | let conn_guard = self.connection.lock(); |
| 4449 | let conn = conn_guard.as_ref()?; |
| 4450 | |
| 4451 | let suite = conn.negotiated_cipher_suite()?; |
| 4452 | |
| 4453 | // Extract cipher information using unified helper |
| 4454 | let cipher_info = extract_cipher_info(&suite); |
| 4455 | |
| 4456 | // Return as list with single tuple (name, version, bits) |
| 4457 | let tuple = vm.ctx.new_tuple(vec![ |
| 4458 | vm.ctx.new_str(cipher_info.name).into(), |
| 4459 | vm.ctx.new_str(cipher_info.protocol).into(), |
| 4460 | vm.ctx.new_int(cipher_info.bits).into(), |
| 4461 | ]); |
| 4462 | Some(vm.ctx.new_list(vec![tuple.into()])) |
| 4463 | } |
| 4464 | |
| 4465 | #[pymethod] |
| 4466 | fn verify_client_post_handshake(&self, vm: &VirtualMachine) -> PyResult<()> { |
nothing calls this directly
no test coverage detected