wodFTPServer ActiveX Control - LoginCertificate Event
    
 

Description

Fires when user wants to authenticate to the server with public key.


Syntax

Private Sub object_LoginCertificate(User, ErrorText, Certificate, Action)



The LoginCertificate Event syntax has these parts:

Part Description
object A wodFTPD object.
User A FtpUser object. Reference to user who provided the certificate.
ErrorText A String value. Text description of certificate validation errors - one per line.
Certificate An ICertificate object. Reference to ICertificate object containing user's certificate.
Action A FtpActions enumeration, as described in settings. When set to Deny/SilentDeny, wodFTPServer denies this action.

Settings

The settings for Action are:

Constant Value Description
 Deny 0 Deny execution of the action.
 Allow 1 Allow to execute action.
 SilentDeny 2 Silently deny execution of the action.
 SilentAllow 3 Silently allow to execute action.

Remarks

LoginCertificate event is fired when the client supplies his client certificate and tries to authenticate using it. At this point, you should decide if you will accept the certificate. If so - set Action = Allow. If you don't want to allow access, set Action = Deny.

It is possible that at this stage user's Login information is empty. This is due to fact that SSL is established and the certificate is provided before any data flow between the client and the server - thus before he managed to send his login information to you.

To get more information about the certificate, feel free to check Certificate's properties and methods - they are provided through wodCertificate object. If supplied certificate contains validation errors, they will be provided through ErrorText property - line by line per error.