SecureBlackbox 2020 Python Edition

Questions / Feedback?

on_unknown_key_received Event

Signals that the server has introduced itself with an unknown key.

Syntax

class SFTPClientUnknownKeyReceivedEventParams(object):
  @property
  def algorithm() -> str: ...
  @property
  def bits() -> int: ...
  @property
  def fingerprint_sha256() -> str: ...
  @property
  def action() -> int: ...
  @action.setter
  def action(value) -> None: ...

# In class SFTPClient:
@property
def on_unknown_key_received() -> Callable[[SFTPClientUnknownKeyReceivedEventParams], None]: ...
@on_unknown_key_received.setter
def on_unknown_key_received(event_hook: Callable[[SFTPClientUnknownKeyReceivedEventParams], None]) -> None: ...

Remarks

The class fires this event to tell the application that the server has introduced itself with a key not present in trusted_keys_file. The details of the key are provided. In this event handler, you need to make a decision whether to proceed with the connection.

Use server_key to access more key details.

Use Action to tell the class what it should do with the key, supported values: catAcceptOnce = 1, catAcceptPermanently = 2, catReject = 3. Note that accepting an unknown and unchecked key may be risky.

Copyright (c) 2022 /n software inc. - All rights reserved.
SecureBlackbox 2020 Python Edition - Version 20.0 [Build 8154]