Make use of SSLContext to configure and then wrap sockets.
For Pythons >= 3.12 ssl.wrap_socket was been remove and this
is the only approach for configuring SSL options.
This should be compatible with Python 3.6 or later.
Change-Id: Ie6632c60db2bda10ad13a2ac2931b88ad52c10f4