Commit b7fb9114 authored by Olivier Gayot's avatar Olivier Gayot
Browse files

tests: replace use of ssl.wrap_socket that throws warnings in Python 3.10



The function ssl.wrap_socket() is deprecated starting Python 3.7 because
it does not support hostname matching (which is considered insecure). In
Python 3.10, the function now throws warnings at runtime, which makes
Ubuntu / Debian autopkgtest fail.

The function ssl.SSLContext.wrap_socket comes in as the replacement and
has support for SNI and hostname matching.

Replaced all uses of ssl.wrap_socket() by equivalent using
ssl.SSLContext.wrap_socket().

Signed-off-by: default avatarOlivier Gayot <olivier.gayot@canonical.com>
parent 3cbe805e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment