diff options
| author | Nick Coghlan <ncoghlan@gmail.com> | 2011-08-27 14:00:27 (GMT) |
|---|---|---|
| committer | Nick Coghlan <ncoghlan@gmail.com> | 2011-08-27 14:00:27 (GMT) |
| commit | 513886aabb634d4b46c6727340c396faf8f7e2b4 (patch) | |
| tree | 0f926dc985f644ca8fcb1e234c31d3e54f7e5506 /Lib/test/test_ssl.py | |
| parent | a89c32ccd9d9ce12a888f9f4b8a0dc1c644066ed (diff) | |
| download | cpython-513886aabb634d4b46c6727340c396faf8f7e2b4.zip cpython-513886aabb634d4b46c6727340c396faf8f7e2b4.tar.gz cpython-513886aabb634d4b46c6727340c396faf8f7e2b4.tar.bz2 | |
Fix #12835: prevent use of the unencrypted sendmsg/recvmsg APIs on SSL wrapped sockets (Patch by David Watson)
Diffstat (limited to 'Lib/test/test_ssl.py')
| -rw-r--r-- | Lib/test/test_ssl.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index a4c1773..e386325 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -1651,6 +1651,14 @@ else: # consume data s.read() + # Make sure sendmsg et al are disallowed to avoid + # inadvertent disclosure of data and/or corruption + # of the encrypted data stream + self.assertRaises(NotImplementedError, s.sendmsg, [b"data"]) + self.assertRaises(NotImplementedError, s.recvmsg, 100) + self.assertRaises(NotImplementedError, + s.recvmsg_into, bytearray(100)) + s.write(b"over\n") s.close() finally: |
