Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose some DTLS-related features #1026

Merged
merged 16 commits into from
Nov 2, 2021
Merged
Prev Previous commit
Next Next commit
blacken
  • Loading branch information
njsmith committed Oct 27, 2021
commit 862fa35312bdc8474587ad520bf1dd61d9760f5c
2 changes: 1 addition & 1 deletion src/OpenSSL/SSL.py
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ def wrapper(ssl, out, outlen):
try:
conn = Connection._reverse_mapping[ssl]
cookie = callback(conn)
out[0:len(cookie)] = cookie
out[0 : len(cookie)] = cookie
outlen[0] = len(cookie)
return 1
except Exception as e:
Expand Down
9 changes: 8 additions & 1 deletion tests/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
)
from sys import platform, getfilesystemencoding
from socket import (
AF_INET, AF_INET6, MSG_PEEK, SHUT_RDWR, error, socket, SOCK_DGRAM, SOCK_STREAM,
AF_INET,
AF_INET6,
MSG_PEEK,
SHUT_RDWR,
error,
socket,
SOCK_DGRAM,
SOCK_STREAM,
)
from os import makedirs
from os.path import join
Expand Down