Back to product page

Certificate property

Holds private certificate/private key information.


wodCertificate object.


  • Basic
[Set] object.Certificate [= value]
The Certificate(object,value) syntax has these parts:
objectAn expression evaluating to an object of type wodFTPD.
valueReference to wodKeys or wodCertificate object.


Certificate property must be set when wodFTPServer is used in secure mode - with SFTP or FTPS protocols. In those cases you need private key (and possibly certificate) you use to decrypt data coming from the client. Certificate property will hold this key from you, either from wodKeys object, or wodCertificate object.

wodKeys usually will be used in SFTP protocol. It will allow you to specify both RSA and DSA keys (both may be needed for servers), and pass them to wodFTPServer through Certificate property. Typically, to use your keys in wodFTPServer you would need something like this:
Dim key As Keys
Set key = New Keys
key.Load "myserverkey.txt"
Set FtpD.Certificate = key

wodCertificate is for FTPS protocols. You can load both certificate (shown to the client) and the private key (for decrypting data). You can try using it this way:
Dim cert As Certificate
Set cert = new Certificate
cert.Load "mycertificate.cer"
cert.LoadKey "myprivkey.txt", mypassword
Set FtpD.Certificate = cert

If you don't specify this property for secure FTP and try to start the server, an error will be generated. Keys are required for operating wodFTPServer in secure mode (meaning for any secure protocol).