[New-bugs-announce] [issue35888] ssl module - could not get the server certificate w/o completed handshake

Lee Eric report at bugs.python.org
Sat Feb 2 01:09:55 EST 2019


New submission from Lee Eric <openlinuxsource at gmail.com>:

Hi,

I'm not sure if this is the right place to ask after I exhausted several communication ways. I'm trying to use standard ssl module to get the server certificate details. If I understand correctly, the certificate I can get only when the TLS/SSL handshake is done. Which means, if the server uses mTLS to authenticate client and I use ssl module to try to get the peer certificate w/o client certificate, I would not get the result due to the handshake is not complete.

I would like to know if there's any method that I can get the certificate even the handshake is not complete. Also, as the very initial handshake stage, in Server Hello the service side has sent out the server certificate already.

If the standard ssl module is designed in this behavior, is there any other module I can use to bypass the completed handshake to get the server certificate?

Thanks.

Eric

----------
assignee: christian.heimes
components: SSL
messages: 334738
nosy: Lee Eric, christian.heimes
priority: normal
severity: normal
status: open
title: ssl module - could not get the server certificate w/o completed handshake
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35888>
_______________________________________


More information about the New-bugs-announce mailing list