◐ Shell
reader mode source ↗
Skip to content

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

Closed
tiran wants to merge 1 commit into
python:3.5from
tiran:backport-66dc33b-3.5
Closed

[3.5] bpo-29334: Fix ssl.getpeercert for auto-handshake (GH-1769)#1779
tiran wants to merge 1 commit into
python:3.5from
tiran:backport-66dc33b-3.5

Conversation

@tiran

@tiran tiran commented May 23, 2017

Copy link
Copy Markdown
Member

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)

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)
@Mariatta

Copy link
Copy Markdown
Member

Is this ready to merge?

@larryhastings

Copy link
Copy Markdown
Contributor

Just a reminder: I expect to tag 3.5.4rc1 in eleven or twelve hours. If this is a bugfix (not a security fix), and it isn't merged by then, it will probably never be merged into 3.5.

@tiran

tiran commented Sep 5, 2017

Copy link
Copy Markdown
Member Author

It's a bug fix.

@tiran tiran closed this Sep 5, 2017
@tiran tiran deleted the backport-66dc33b-3.5 branch September 5, 2017 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants