Skip to content

Commit efcf1e2

Browse files
committed
fix: point extension control only up to tls 1.2
1 parent c9f61d3 commit efcf1e2

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

tlslite/tlsconnection.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3437,19 +3437,20 @@ def _serverGetClientHello(self, settings, private_key, cert_chain,
34373437
yield result
34383438

34393439
# sanity check the ec point formats extension
3440-
ecExt = clientHello.getExtension(ExtensionType.ec_point_formats)
3441-
if ecExt:
3442-
if not ecExt.formats:
3443-
for result in self._sendError(
3444-
AlertDescription.decode_error,
3445-
"Empty ec_point_formats extension"):
3446-
yield result
3447-
if ECPointFormat.uncompressed not in ecExt.formats:
3448-
for result in self._sendError(
3449-
AlertDescription.illegal_parameter,
3450-
"Client sent ec_point_formats extension "
3451-
"without uncompressed format"):
3452-
yield result
3440+
if real_version <= (3, 3):
3441+
ecExt = clientHello.getExtension(ExtensionType.ec_point_formats)
3442+
if ecExt:
3443+
if not ecExt.formats:
3444+
for result in self._sendError(
3445+
AlertDescription.decode_error,
3446+
"Empty ec_point_formats extension"):
3447+
yield result
3448+
if ECPointFormat.uncompressed not in ecExt.formats:
3449+
for result in self._sendError(
3450+
AlertDescription.illegal_parameter,
3451+
"Client sent ec_point_formats extension "
3452+
"without uncompressed format"):
3453+
yield result
34533454

34543455
# sanity check the TLS 1.3 extensions
34553456
ver_ext = clientHello.getExtension(ExtensionType.supported_versions)

0 commit comments

Comments
 (0)