mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-02-12 16:10:57 +00:00
Refine security
This commit is contained in:
@ -14,6 +14,7 @@ class ISecureConn(ABC):
|
|||||||
:return: connection object that has been made secure
|
:return: connection object that has been made secure
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
def get_security_details(self):
|
def get_security_details(self):
|
||||||
"""
|
"""
|
||||||
:return: map containing details about the connections security
|
:return: map containing details about the connections security
|
||||||
|
|||||||
@ -10,16 +10,19 @@ class TransportUpgrader:
|
|||||||
|
|
||||||
def upgrade_listener(self, transport, listeners):
|
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
|
pass
|
||||||
|
|
||||||
def upgrade_connection(self, conn, generic_protocol_handler, peer_id):
|
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
|
# For PoC, no security, default to mplex
|
||||||
|
|||||||
Reference in New Issue
Block a user