[issue34747] SSLSocket.context cannot be changed on non-connected sockets

2021-03-21 Thread Vincent Pelletier
Vincent Pelletier added the comment: Added: affects Python 3.9 This bug is still preventing (...or shall I say "discourages", as the setter is effective but raises) server-side SSL certificate reloading on long-running services. This codepath on listening sockets is necessary for seamless

[issue34747] SSLSocket.context cannot be changed on non-connected sockets

2018-10-15 Thread Vincent Pelletier
Vincent Pelletier added the comment: The reason which led me into this is server certificate renewal: my service crashed on that setter 2 months after starting, when it received a new certificate. I toyed with the idea of closing the listening sockets, but without closing would be even

[issue34747] SSLSocket.context cannot be changed on non-connected sockets

2018-10-15 Thread Christian Heimes
Christian Heimes added the comment: How did you run into the issue? There is no reason to ever replace the context of a listening socket. The context setter is designed for SNI-based virtual hosting to replace the context of a bound server-side connection. You never change the listening

[issue34747] SSLSocket.context cannot be changed on non-connected sockets

2018-10-15 Thread Vincent Pelletier
Change by Vincent Pelletier : -- assignee: -> christian.heimes components: +Library (Lib), SSL nosy: +christian.heimes ___ Python tracker ___

[issue34747] SSLSocket.context cannot be changed on non-connected sockets

2018-09-20 Thread Vincent Pelletier
New submission from Vincent Pelletier : >From ssl.py, both on 2.7.15 and 3.6.6: class SSLSocket(...): ... @context.setter def context(self, ctx): self._context = ctx self._sslobj.context = ctx _sslobj is only set when socket is connected. While this is not a big issue