Work on tunnels

This commit is contained in:
Mark Qvist 2021-09-18 18:40:27 +02:00
parent 6b3cc07740
commit 8646be0dcf

View File

@ -176,6 +176,7 @@ class Transport:
RNS.log("Transport instance "+str(Transport.identity)+" started") RNS.log("Transport instance "+str(Transport.identity)+" started")
# Synthesize tunnels for any interfaces wanting it
for interface in Transport.interfaces: for interface in Transport.interfaces:
if hasattr(interface, "wants_tunnel") and interface.wants_tunnel: if hasattr(interface, "wants_tunnel") and interface.wants_tunnel:
Transport.synthesize_tunnel(interface) Transport.synthesize_tunnel(interface)
@ -959,7 +960,7 @@ class Transport:
remote_transport_identity = RNS.Identity(create_keys=False) remote_transport_identity = RNS.Identity(create_keys=False)
remote_transport_identity.load_public_key(public_key) remote_transport_identity.load_public_key(public_key)
RNS.log("Transport ID : "+str(Transport.identity)) RNS.log("Transport ID : "+str(remote_transport_identity))
RNS.log("Tunnel ID : "+RNS.hexrep(tunnel_id)) RNS.log("Tunnel ID : "+RNS.hexrep(tunnel_id))
RNS.log("IF hash : "+RNS.hexrep(interface_hash)) RNS.log("IF hash : "+RNS.hexrep(interface_hash))
RNS.log("Rnd hash : "+RNS.hexrep(random_hash)) RNS.log("Rnd hash : "+RNS.hexrep(random_hash))
@ -968,6 +969,7 @@ class Transport:
if remote_transport_identity.validate(signature, signed_data): if remote_transport_identity.validate(signature, signed_data):
RNS.log("Signature is valid") RNS.log("Signature is valid")
tunnel_entry =
else: else:
RNS.log("Signature is invalid") RNS.log("Signature is invalid")