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

Method post_dissection

scapy/layers/tls/handshake.py:1090–1109  ·  view source on GitHub ↗

While previously dissecting Server*DHParams, the session server_kx_pubkey should have been updated. XXX Add a 'fixed_dh' OR condition to the 'anonymous' test.

(self, pkt)

Source from the content-addressed store, hash-verified

1088 return _TLSHandshake.build(self, *args, **kargs)
1089
1090 def post_dissection(self, pkt):
1091 """
1092 While previously dissecting Server*DHParams, the session
1093 server_kx_pubkey should have been updated.
1094
1095 XXX Add a 'fixed_dh' OR condition to the 'anonymous' test.
1096 """
1097 s = self.tls_session
1098 if s.prcs and s.prcs.key_exchange.no_ske:
1099 pkt_info = pkt.firstlayer().summary()
1100 log_runtime.info("TLS: useless ServerKeyExchange [%s]", pkt_info)
1101 if (s.prcs and
1102 not s.prcs.key_exchange.anonymous and
1103 s.client_random and s.server_random and
1104 s.server_certs and len(s.server_certs) > 0):
1105 m = s.client_random + s.server_random + raw(self.params)
1106 sig_test = self.sig._verify_sig(m, s.server_certs[0])
1107 if not sig_test:
1108 pkt_info = pkt.firstlayer().summary()
1109 log_runtime.info("TLS: invalid ServerKeyExchange signature [%s]", pkt_info) # noqa: E501
1110
1111
1112###############################################################################

Callers

nothing calls this directly

Calls 4

rawFunction · 0.90
firstlayerMethod · 0.80
_verify_sigMethod · 0.80
summaryMethod · 0.45

Tested by

no test coverage detected