[issue16306] Multiple error line for unknown command line parameter
New submission from Thiébaud Weksteen: Hi, I've just came across an insignificant bug in the Python command line interface. When using an unknown parameter, the same error appears more than once: $ python3 -a -z Unknown option: -a Unknown option: -z Unknown option: -a usage: python3 [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. $ python -a -z Unknown option: -a Unknown option: -z Unknown option: -a usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try `python -h' for more information. -- components: None messages: 173649 nosy: tweksteen priority: normal severity: normal status: open title: Multiple error line for unknown command line parameter type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/issue16306> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15464] ssl: add set_msg_callback function
Thiébaud Weksteen added the comment: When I wrote this patch, I was focusing on a particular usage and the buffer was the only parameter that interested me. But you're right, the other parameters should be included. Which brings the following questions: * write_p looks like a boolean, would it be appropriate to make it like that? Or keep it integer? * version can be SSL2_VERSION , SSL3_VERSION or TLS1_VERSION. However, these constants are not used yet in _ssl. Should they be mapped to the current ones (with the tricky exception of PROTOCOL_SSLv23)? * content_type could just be passed as a regular integer. Thanks -- ___ Python tracker <http://bugs.python.org/issue15464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15464] ssl: add set_msg_callback function
Thiébaud Weksteen added the comment: I've updated the patch with this method of testing. -- Added file: http://bugs.python.org/file26589/ssl_msg_callback-0.2.patch ___ Python tracker <http://bugs.python.org/issue15464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15464] ssl: add set_msg_callback function
Thiébaud Weksteen added the comment: I'm not sure what would be the best way to verify that. What about: def test_connect_with_msg_callback(self): with support.transient_internet("svn.python.org"): self.called = False def cb(packet): self.assertGreater(len(packet), 0) self.called = True ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23) ctx.set_msg_callback(cb) s = ctx.wrap_socket(socket.socket(socket.AF_INET)) try: s.connect(("svn.python.org", 443)) self.assertTrue(self.called) finally: s.close() -- ___ Python tracker <http://bugs.python.org/issue15464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue15464] ssl: add set_msg_callback function
New submission from Thiébaud Weksteen : I wrote a patch for Python 3 to expose the function SSL_CTX_set_msg_callback in the module ssl. Here is a description of this function: "SSL_CTX_set_msg_callback() or SSL_set_msg_callback() can be used to define a message callback function cb for observing all SSL/TLS protocol messages (such as handshake messages) that are received or sent." There is also a test case included in the patch. Comments are welcomed. -- components: Extension Modules files: ssl_msg_callback.patch keywords: patch messages: 166532 nosy: tweksteen priority: normal severity: normal status: open title: ssl: add set_msg_callback function type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file26534/ssl_msg_callback.patch ___ Python tracker <http://bugs.python.org/issue15464> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com