New submission from Mathieu Pasquet:

Currently, the only workaround is to use transport._sock.getpeercert(True) on 
the Transport returned by loop.create_connection(), which is not something to 
be encouraged. It is useful to get such information, for example to perform a 
manual certificate check against a previously recorded certificate or hash.

I attached a trivial patch adding an extra 'peercert_bin' info, but I do not 
know if this is the right approach, as other issues of feature disparity might 
arise when more people try to switch to asyncio. Exposing a proxy SSLSocket 
object for read-only functions might be more beneficial.

----------
components: asyncio
files: peercert_bin.patch
keywords: patch
messages: 230281
nosy: gvanrossum, haypo, mathieui, yselivanov
priority: normal
severity: normal
status: open
title: Add a way to get the peer certificate of a SSL Transport
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file37076/peercert_bin.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue22768>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to