prefer server alpn ordering over the client's

This commit is contained in:
Benjamin Peterson 2015-01-23 17:30:26 -05:00
parent cca2732a82
commit 8861502e07
3 changed files with 24 additions and 16 deletions

View file

@ -3054,9 +3054,9 @@ else:
server_protocols = ['foo', 'bar', 'milkshake']
protocol_tests = [
(['foo', 'bar'], 'foo'),
(['bar', 'foo'], 'bar'),
(['bar', 'foo'], 'foo'),
(['milkshake'], 'milkshake'),
(['http/3.0', 'http/4.0'], 'foo')
(['http/3.0', 'http/4.0'], None)
]
for client_protocols, expected in protocol_tests:
server_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1)