Skip to content

[3.6] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769)#1778

Merged
tiran merged 1 commit intopython:3.6from
tiran:backport-66dc33b-3.6
Sep 5, 2017
Merged

[3.6] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769)#1778
tiran merged 1 commit intopython:3.6from
tiran:backport-66dc33b-3.6

Conversation

@tiran
Copy link
Copy Markdown
Member

@tiran tiran commented May 23, 2017

Drop handshake_done and peer_cert members from PySSLSocket struct. The
peer certificate can be acquired from *SSL directly.
SSL_get_peer_certificate() does not trigger any network activity.
Instead of manually tracking the handshake state, simply use
SSL_is_init_finished().

In combination these changes fix auto-handshake for non-blocking
MemoryBIO connections.

Signed-off-by: Christian Heimes christian@python.org.
(cherry picked from commit 66dc33b)

https://bugs.python.org/issue29334

@Mariatta
Copy link
Copy Markdown
Member

Is this ready for merging?

Drop handshake_done and peer_cert members from PySSLSocket struct. The
peer certificate can be acquired from *SSL directly.
SSL_get_peer_certificate() does not trigger any network activity.
Instead of manually tracking the handshake state, simply use
SSL_is_init_finished().

In combination these changes fix auto-handshake for non-blocking
MemoryBIO connections.

Signed-off-by: Christian Heimes <christian@python.org>.
(cherry picked from commit 66dc33b)
@tiran tiran force-pushed the backport-66dc33b-3.6 branch from 91f413f to ed00fc4 Compare September 5, 2017 17:18
@tiran tiran added the skip news label Sep 5, 2017
@tiran tiran merged commit 63b3f2b into python:3.6 Sep 5, 2017
@tiran tiran deleted the backport-66dc33b-3.6 branch September 5, 2017 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants