Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Unified Diff: third_party/tlslite/tlslite/handshakesettings.py

Issue 2205433002: Implement ALPN in tlslite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase; update alpn.patch. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/tlslite/tlslite/handshakesettings.py
diff --git a/third_party/tlslite/tlslite/handshakesettings.py b/third_party/tlslite/tlslite/handshakesettings.py
index d7be5b3c16e9ae3fd44a669513bcdbd6068af103..284c474e3e584b4738a676b851718c6fa1bf2862 100644
--- a/third_party/tlslite/tlslite/handshakesettings.py
+++ b/third_party/tlslite/tlslite/handshakesettings.py
@@ -128,6 +128,18 @@ class HandshakeSettings(object):
Note that TACK support is not standardized by IETF and uses a temporary
TLS Extension number, so should NOT be used in production software.
+
+ @type alpnProtos: list of strings.
+ @param alpnProtos: A list of supported upper layer protocols to use in the
+ Application-Layer Protocol Negotiation Extension (RFC 7301). For the
+ client, the order does not matter. For the server, the list is in
+ decreasing order of preference.
+
+ @type nextProtos: list of strings.
+ @param nextProtos: A list of supported upper layer protocols to use in the
+ Next-Protocol Negotiation Extension. For the server, the order does not
+ matter. For the client, the list is in decreasing order of preference, with
+ the first entry used for fallback.
"""
def __init__(self):
self.minKeySize = 1023
@@ -146,6 +158,8 @@ class HandshakeSettings(object):
self.enableChannelID = True
self.enableExtendedMasterSecret = True
self.supportedTokenBindingParams = []
+ self.alpnProtos = None
+ self.nextProtos = None
# Validates the min/max fields, and certificateTypes
# Filters out unsupported cipherNames and cipherImplementations
@@ -166,6 +180,8 @@ class HandshakeSettings(object):
other.enableChannelID = self.enableChannelID
other.enableExtendedMasterSecret = self.enableExtendedMasterSecret
other.supportedTokenBindingParams = self.supportedTokenBindingParams
+ other.alpnProtos = self.alpnProtos;
+ other.nextProtos = self.nextProtos;
if not cipherfactory.tripleDESPresent:
other.cipherNames = [e for e in self.cipherNames if e != "3des"]

Powered by Google App Engine
This is Rietveld 408576698