Skip to content

Commit

Permalink
Don't crash on invalid certificates (TLS) (#4494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank-Buss committed Sep 3, 2024
1 parent 6f0eb89 commit 5c7b694
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scapy/layers/tls/handshake.py
Original file line number Diff line number Diff line change
Expand Up @@ -1006,11 +1006,11 @@ def post_dissection_tls_session_update(self, msg_str):
connection_end = self.tls_session.connection_end
if connection_end == "client":
if self.certs:
sc = [x.cert[1] for x in self.certs]
sc = [x.cert[1] for x in self.certs if hasattr(x, 'cert')]
self.tls_session.server_certs = sc
else:
if self.certs:
cc = [x.cert[1] for x in self.certs]
cc = [x.cert[1] for x in self.certs if hasattr(x, 'cert')]
self.tls_session.client_certs = cc


Expand Down

0 comments on commit 5c7b694

Please sign in to comment.