Mads Kiilerich <m...@kiilerich.com> added the comment: > I'm a bit wary of API bloat here.
Yes, but explicit is better than magic ... > Thanks. So fixing how getpeercert behaves and either raise a dedicated > error or return None would improve things here, right? Well ... that would at least make it theoretically possible to claim that it works as intended ;-) A counter argument could be that retrieving the certificate that already has been used for negotiation isn't a socket operation. It would make sense to be able to look at it even after the socket has been closed. From that point of view _sslobj should be kept "forever". A return value of None would still not indicate if we had a working connection without certificate or a failed connection. That would be annoying. My primary concern with my Mercurial hat on is to get the documentation updated so we know how to write code that works correctly also with previous Python versions. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13721> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com