UnknownKeyReceived Event
Signals that the server has introduced itself with an unknown key.
Syntax
class SFTPClientUnknownKeyReceivedEventParams { public: const QString &Algorithm(); int Bits(); const QString &FingerprintSHA256(); int Action(); void SetAction(int iAction); int EventRetVal(); void SetEventRetVal(int iRetVal); };
// To handle, connect one or more slots to this signal. void UnknownKeyReceived(SFTPClientUnknownKeyReceivedEventParams *e);
// Or, subclass SFTPClient and override this emitter function. virtual int FireUnknownKeyReceived(SFTPClientUnknownKeyReceivedEventParams *e) {...}
Remarks
The class fires this event to tell the application that the server has introduced itself with a key not present in TrustedKeysFile. The details of the key are provided. In this event handler, you need to make a decision whether to proceed with the connection.
Use ServerKey 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.