In the SSLSocket __init__ function, it's ok to do a socket type check with argument sock.But meanwhile the sock argument can't be None, which make the SSLSocket socket __init__ way meaningless.Although there are three branch conditions as argument sock, fileno and other.
The issue 27629 describe creating a SSLSocket only with server_hostname argument.But what i said is that we can't creating a SSLSocket with fileno argument from a existing socket.I'm strange about this code design that meaningless branch conditions exists.
Did you look at the patch? It adds the following test case: + s = socket.socket() + sfd = s.fileno() + # Create secure socket from fileno + ss = ssl.SSLSocket(fileno=sfd) + self.assertTrue(ss.fileno() == sfd) Isn't that what you want to achieve?
Great, closing this then. > And the next release will include this patch? Christian (one of our SSL module maintainers) just reviewed the patch so the next step is to address his review comments and upload a new patch. If you don't see any movement from nemunaire (the original author of the patch) after a week or so, you can update the patch yourself (it would help to get it fixed sooner.)
History
Date
User
Action
Args
2022-04-11 14:58:35
admin
set
github: 72183
2016-09-07 12:37:24
berker.peksag
set
status: open -> closedresolution: duplicatemessages: +
2016-09-07 12:17:06
SenBin Yu
set
messages: +
2016-09-07 12:00:19
berker.peksag
set
messages: +
2016-09-07 11:51:30
SenBin Yu
set
status: closed -> openresolution: duplicate -> (no value)messages: +