Skip to content
Snippets Groups Projects
Commit 1fde84d4 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

sslutil: require a server hostname when wrapping sockets (API)

All callers appear to be passing the hostname. So this shouldn't
break anything. By specifying the hostname, more validation options
from the ssl module are available to us. Although this patch stops
short of using them.
parent e330db20
No related branches found
No related tags found
No related merge requests found
......@@ -120,6 +120,9 @@
server (and client) support SNI, this tells the server which certificate
to use.
"""
if not serverhostname:
raise error.Abort('serverhostname argument required')
# Despite its name, PROTOCOL_SSLv23 selects the highest protocol
# that both ends support, including TLS protocols. On legacy stacks,
# the highest it likely goes in TLS 1.0. On modern stacks, it can
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment