@@ -421,7 +421,10 @@ def get_param(cls):
421
421
422
422
@attr .s # pylint: disable=too-many-instance-attributes
423
423
class TlsHandshakeClientHello (TlsHandshakeHello ):
424
- cipher_suites = attr .ib (converter = TlsCipherSuiteVector )
424
+ cipher_suites = attr .ib (
425
+ converter = TlsCipherSuiteVector ,
426
+ validator = attr .validators .instance_of (TlsCipherSuiteVector )
427
+ )
425
428
protocol_version = attr .ib (
426
429
default = TlsProtocolVersionFinal (TlsVersion .TLS1_2 ),
427
430
validator = attr .validators .instance_of ((TlsProtocolVersionBase , SslProtocolVersion )),
@@ -438,7 +441,11 @@ class TlsHandshakeClientHello(TlsHandshakeHello):
438
441
default = TlsCompressionMethodVector ([TlsCompressionMethod .NULL , ]),
439
442
validator = attr .validators .instance_of (TlsCompressionMethodVector ),
440
443
)
441
- extensions = attr .ib (default = TlsExtensions (()), validator = attr .validators .instance_of (TlsExtensions ))
444
+ extensions = attr .ib (
445
+ default = TlsExtensions (()),
446
+ converter = TlsExtensions ,
447
+ validator = attr .validators .instance_of (TlsExtensions )
448
+ )
442
449
fallback_scsv = attr .ib (default = False , validator = attr .validators .instance_of (bool ))
443
450
empty_renegotiation_info_scsv = attr .ib (default = True , validator = attr .validators .instance_of (bool ))
444
451
@@ -559,7 +566,11 @@ class TlsHandshakeServerHello(TlsHandshakeHello):
559
566
validator = attr .validators .in_ (TlsCompressionMethod ),
560
567
)
561
568
cipher_suite = attr .ib (default = None , validator = attr .validators .in_ (TlsCipherSuite ))
562
- extensions = attr .ib (default = None , validator = attr .validators .instance_of (TlsExtensions ))
569
+ extensions = attr .ib (
570
+ default = TlsExtensions ([]),
571
+ converter = TlsExtensions ,
572
+ validator = attr .validators .instance_of (TlsExtensions )
573
+ )
563
574
564
575
@classmethod
565
576
def get_handshake_type (cls ):
0 commit comments