Skip to content

Commit

Permalink
Set tls_session.server_key too
Browse files Browse the repository at this point in the history
  • Loading branch information
peace-maker committed Nov 19, 2023
1 parent bc93f74 commit df7a637
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion converters/tls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
TLSApplicationData,
Cert,
PrivKey,
PrivKeyRSA,
tlsSession,
load_nss_keys,
)
Expand Down Expand Up @@ -35,7 +36,9 @@ def handle_stream(self, stream: Stream) -> Result:
tls_session.ipdst = stream.Metadata.ServerHost
if key_path.exists():
key = PrivKey(key_path)
tls_session.server_rsa_key = key
tls_session.server_key = key
if isinstance(key, PrivKeyRSA):
tls_session.server_rsa_key = key
if cert_path.exists():
cert = Cert(cert_path)
tls_session.server_certs = [cert]
Expand Down

0 comments on commit df7a637

Please sign in to comment.