Package onep :: Package core :: Package util :: Module tlspinning :: Class TLSUnverifiedElementHandler
[frames] | no frames]

Class TLSUnverifiedElementHandler


This class represents a handler for TLS connections in which the network element has not been verified.

The class that wants to process unverified TLS connections and decide whether to accept or reject them should subclass this class.

Instance Methods
DecisionType
handle_verify(self, host, hash_type, fingerprint, changed)
Invoked when a the network element could not be verified.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  __metaclass__ = ABCMeta
Properties

Inherited from object: __class__

Method Details

handle_verify(self, host, hash_type, fingerprint, changed)

 

Invoked when a the network element could not be verified.

Parameters:
  • host (str) - The hostname of the network element.
  • hash_type (str) - The hashing algorithm used for the fingerprint.
  • fingerprint (str) - The fingerprint of the presented ceritificate.
  • changed (bool) - True if and only if there is an entry for the host in the pinning file but the presented certificate did not match the pinned certificate.
Returns: DecisionType
The action to take on the connection.
Decorators:
  • @abstractmethod