Issue 9075: ssl module sets "debug" flag on SSL struct (original) (raw)
Created on 2010-06-24 23:03 by pitrou, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (4)
Author: Antoine Pitrou (pitrou) *
Date: 2010-06-24 23:03
The ssl module sets a "debug" flag on the OpenSSL SSL struct at the end of PySSL_SSLdo_handshake():
self->ssl->debug = 1;
The OpenSSL header files have this to say about this flag:
/* set this flag to 1 and a sleep(1) is put into all SSL_read()
* and SSL_write() calls, good for nbio debuging :-) */
int debug;
Some uses of it in the OpenSSL source are actually guarded by a macro (#ifdef PKT_DEBUG), but some are not. Bill, do you remember why you put that call? I would find it strongly preferrable to remove that assignment (doing so doesn't seem to break anything in the test suite).
Author: Antoine Pitrou (pitrou) *
Date: 2010-06-24 23:23
Actually, looking at the history of the SVN repo, this dates back to 1999 when the first SSL support was incorporated by Guido based on third-party patches, and no trace of a review discussion can be found. The only thing we can do is assume it's useless (and perhaps detrimental to performance) and remove it now.
Benjamin, do you think it's safe for 2.7 or should wait for 2.7.1?
Author: Benjamin Peterson (benjamin.peterson) *
Date: 2010-06-24 23:55
Let it die.
Author: Antoine Pitrou (pitrou) *
Date: 2010-06-25 00:13
Thanks! Committed in r82210 (trunk), r82211 (py3k), r82212 (2.6), r82213 (3.1).
History
Date
User
Action
Args
2022-04-11 14:57:02
admin
set
github: 53321
2010-06-30 01:21:03
srid
set
nosy: + srid
2010-06-25 00:13:34
pitrou
set
status: open -> closed
resolution: fixed
messages: +
stage: resolved
2010-06-24 23:55:25
benjamin.peterson
set
messages: +
2010-06-24 23:23:12
pitrou
set
nosy: + benjamin.peterson
messages: +
2010-06-24 23:03:13
pitrou
create