2019-04-28 07:42:05 +08:00
|
|
|
from abc import ABC, abstractmethod
|
|
|
|
|
2019-05-02 01:54:19 +08:00
|
|
|
# pylint: disable=W0105
|
|
|
|
|
2019-04-28 07:42:05 +08:00
|
|
|
"""
|
|
|
|
Represents a secured connection object, which includes a connection and details about the security
|
|
|
|
involved in the secured connection
|
|
|
|
|
|
|
|
Relevant go repo: https://github.com/libp2p/go-conn-security/blob/master/interface.go
|
|
|
|
"""
|
|
|
|
class ISecureConn(ABC):
|
|
|
|
|
|
|
|
@abstractmethod
|
|
|
|
def get_conn(self):
|
|
|
|
"""
|
|
|
|
:return: connection object that has been made secure
|
|
|
|
"""
|
|
|
|
|
2019-04-30 06:05:38 +08:00
|
|
|
@abstractmethod
|
2019-04-28 07:42:05 +08:00
|
|
|
def get_security_details(self):
|
|
|
|
"""
|
|
|
|
:return: map containing details about the connections security
|
|
|
|
"""
|