Message150885
| Author |
pitrou |
| Recipients |
kiilerix, pitrou |
| Date |
2012年01月08日.17:50:59 |
| SpamBayes Score |
4.164053e-07 |
| Marked as misclassified |
No |
| Message-id |
<1326044979.3374.27.camel@localhost.localdomain> |
| In-reply-to |
<1326043314.86.0.512929381574.issue13721@psf.upfronthosting.co.za> |
| Content |
> The only way to reliably implement the documented wrap_socket API
> might thus be to maintain a flag in PySocketSockObject.
Agreed. With the annoyance that the flag must be exposed to Python code,
since ssl's wrap_socket is written in Python. It may be private, though.
> Introducing a new and more explicit way of wrapping connected sockets
> might be a simpler and more stable solution.
I'm a bit wary of API bloat here.
> From another perspective: Any user of sockets must be aware that
> socket operations can fail at any time. It might thus not be a problem
> that wrap_socket fails to fail, as long as the programmer knows how to
> catch the failure in the next operation. From that point of view the
> problem is that it is surprising and undocumented how getpeercert can
> fail.
Thanks. So fixing how getpeercert behaves and either raise a dedicated
error or return None would improve things here, right? |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年01月08日 17:51:00 | pitrou | set | recipients:
+ pitrou, kiilerix |
| 2012年01月08日 17:50:59 | pitrou | link | issue13721 messages |
| 2012年01月08日 17:50:59 | pitrou | create |
|