Back to product page

HostFingerprint method


Called when remote server provides public key fingerprint information.

Type

None

Syntax

  • Basic
object.HostFingerprint Owner, Fingerprint, Accept
The HostFingerprint(object,Owner,Fingerprint,Accept) syntax has these parts:
objectAn expression evaluating to an object of type IwodFtpNotify.
OwnerRequired. A wodFtpDLXCom object.
FingerprintRequired. A String value. Represents remote server fingerprint.
AcceptRequired. A Boolean value. If set to False then wodFtpDLX will close the connection.

Remarks

This method is called only if you implemented IwodFtpNotify interface in your application, and wodFtpDLX.Notification property has received reference to instance of your implementation.

Since SSH2 (and SFTP on it) architecture doesn't know about certificates, or other means of checking if remote server is really the one you intended to connect to, it is a matter of 'trust' if you will accept connection or not.

This is how SSH works in real life - once you connect to remote server and you are sure it is really the server you expect it to be, you should store Fingerprint information locally. For each new connection, you should test if Fingerprint information is same as stored one - to be sure that no one is 'in the middle' spying on your connection. Fingerprint information is almost unique among different servers, and it is generated from server's private key.

If you set Accept to True (default), wodFtpDLX will continue to perform negotiation with the server normally. If you set it to False (for instance, because you see that Fingerprint information is not the same as before), it will drop the connection.

Platforms

Windows