MCPcopy Create free account
hub / github.com/secdev/scapy / should_add_ClientHello

Method should_add_ClientHello

scapy/layers/tls/automaton_cli.py:332–350  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

330
331 @ATMT.condition(PREPARE_CLIENTFLIGHT1)
332 def should_add_ClientHello(self):
333 if self.client_hello:
334 p = self.client_hello
335 else:
336 p = TLSClientHello(ciphers=self.ciphersuite)
337 ext = []
338 # Add TLS_Ext_SignatureAlgorithms for TLS 1.2 ClientHello
339 if self.cur_session.advertised_tls_version == 0x0303:
340 ext += [TLS_Ext_SignatureAlgorithms(
341 sig_algs=self.supported_signature_algorithms,
342 )]
343 # Add TLS_Ext_ServerName
344 if self.server_name:
345 ext += TLS_Ext_ServerName(
346 servernames=[ServerName(servername=self.server_name)]
347 )
348 p.ext = ext
349 self.add_msg(p)
350 raise self.ADDED_CLIENTHELLO()
351
352 @ATMT.state()
353 def ADDED_CLIENTHELLO(self):

Callers

nothing calls this directly

Calls 6

ADDED_CLIENTHELLOMethod · 0.95
TLSClientHelloClass · 0.90
TLS_Ext_ServerNameClass · 0.90
ServerNameClass · 0.90
add_msgMethod · 0.80

Tested by

no test coverage detected