Refine security

This commit is contained in:
Stuckinaboot 2019-04-29 18:05:38 -04:00
parent eb26661652
commit 1fb4372ede
2 changed files with 8 additions and 4 deletions

View File

@ -14,6 +14,7 @@ class ISecureConn(ABC):
:return: connection object that has been made secure
"""
@abstractmethod
def get_security_details(self):
"""
:return: map containing details about the connections security

View File

@ -10,16 +10,19 @@ class TransportUpgrader:
def upgrade_listener(self, transport, listeners):
"""
upgrade multiaddr listeners to libp2p-transport listeners
Upgrade multiaddr listeners to libp2p-transport listeners
"""
def upgrade_security(self):
def upgrade_security(self, conn, peer_id):
"""
Upgrade conn to be a secured connection
"""
# TODO: Do exchange to determine security module
pass
def upgrade_connection(self, conn, generic_protocol_handler, peer_id):
"""
upgrade raw connection to muxed connection
Upgrade raw connection to muxed connection
"""
# For PoC, no security, default to mplex