| 2789 | |
| 2790 | #[pymethod] |
| 2791 | fn verify_client_post_handshake(&self, vm: &VirtualMachine) -> PyResult<()> { |
| 2792 | #[cfg(ossl111)] |
| 2793 | { |
| 2794 | let stream = self.connection.read(); |
| 2795 | let result = unsafe { SSL_verify_client_post_handshake(stream.ssl().as_ptr()) }; |
| 2796 | if result == 0 { |
| 2797 | Err(convert_openssl_error(vm, openssl::error::ErrorStack::get())) |
| 2798 | } else { |
| 2799 | Ok(()) |
| 2800 | } |
| 2801 | } |
| 2802 | #[cfg(not(ossl111))] |
| 2803 | { |
| 2804 | Err(vm.new_not_implemented_error( |
| 2805 | "Post-handshake auth is not supported by your OpenSSL version.", |
| 2806 | )) |
| 2807 | } |
| 2808 | } |
| 2809 | |
| 2810 | #[pymethod] |
| 2811 | fn shutdown(&self, vm: &VirtualMachine) -> PyResult<Option<PyRef<PySocket>>> { |