Skip to content

Commit

Permalink
Merge pull request #307 from tomato42/tls1_3-finals
Browse files Browse the repository at this point in the history
Change to final protocol version for TLS 1.3
  • Loading branch information
tomato42 committed Aug 30, 2018
2 parents d9a0fd9 + 472c353 commit 45e81dc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tlslite/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

# protocol version number used for negotiating TLS 1.3 between implementations
# of the draft specification
TLS_1_3_DRAFT = (127, 28)
# DEPRECATED!
TLS_1_3_DRAFT = (3, 4)


# ServerHello.random value meaning that the message is a HelloRetryRequest
Expand Down
4 changes: 2 additions & 2 deletions tlslite/handshakesettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

"""Class for setting handshake parameters."""

from .constants import CertificateType, TLS_1_3_DRAFT
from .constants import CertificateType
from .utils import cryptomath
from .utils import cipherfactory
from .utils.compat import ecdsaAllCurves, int_types
Expand Down Expand Up @@ -254,7 +254,7 @@ def __init__(self):
self._init_misc_extensions()
self.minVersion = (3, 1)
self.maxVersion = (3, 4)
self.versions = [TLS_1_3_DRAFT, (3, 3), (3, 2), (3, 1)]
self.versions = [(3, 4), (3, 3), (3, 2), (3, 1)]
self.cipherNames = list(CIPHER_NAMES)
self.macNames = list(MAC_NAMES)
self.keyExchangeNames = list(KEY_EXCHANGE_NAMES)
Expand Down
2 changes: 1 addition & 1 deletion tlslite/tlsconnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2558,7 +2558,7 @@ def _serverGetClientHello(self, settings, cert_chain, verifierDB,

# sanity check the TLS 1.3 extensions
ver_ext = clientHello.getExtension(ExtensionType.supported_versions)
if ver_ext and TLS_1_3_DRAFT in ver_ext.versions:
if ver_ext and (3, 4) in ver_ext.versions:
psk = clientHello.getExtension(ExtensionType.pre_shared_key)
if psk:
psk_modes = clientHello.getExtension(
Expand Down
3 changes: 1 addition & 2 deletions tlslite/tlsrecordlayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,7 @@ def getVersionName(self):
(3, 1): "TLS 1.0",
(3, 2): "TLS 1.1",
(3, 3): "TLS 1.2",
(3, 4): "TLS 1.3",
TLS_1_3_DRAFT: "TLS 1.3"}
(3, 4): "TLS 1.3"}
return ver.get(self.version)

def getCipherName(self):
Expand Down

0 comments on commit 45e81dc

Please sign in to comment.