
Access from conzept 16 to FTP servers is possible on the basis of socket commands; a corresponding example can be found in the code library. Encrypted transmission is only possible with FTP servers with implicit SSL encryption (FTPS on port 990), which are rarely encountered in practice. SFTP (based on SSH) and FTP/SSL (with explicit SSL) cannot be realized on the basis of the socket functions.
How can data be transmitted in encrypted form?
The required functions can be added to conzept 16 using a DLL. The following protocols are available:
- FTP (File Transfer Protocol)
- FTP/SSL (FTP with SSL 3.0 or TLS 1.0 authentication)
- FTPS (FTP with implicit SSL encryption)
- SFTP (Secure File Transfer Protocol), is based on the SSH protocol
Although the SFTP and FTP protocols are technically very different, the same DLL functions can be used for both types.
What functions does the DLL offer?
Once the DLL has been initialized, a connection to a server can be established. With FTP-based protocols, this is done with a user name and password. This option can also be used with SFTP. Alternatively, SFTP can be authenticated by user plus client certificate with an optional password.
After authentication, the following options are available:
- Determine directory contents as Cte list
- Create directories
- Rename and delete files and directories
- Check whether files exist
- Upload and download files with the option to resume
A callback function can also be specified when uploading and downloading files. The current percentage of data transferred so far is regularly transferred to this function. The return value of the function can be used to decide whether the upload or download should be aborted.
Application example – Upload a file
// Initialize FTP module (mode = Secure File Transfer Protocol)
tErr # MdlFtp:Init('C:\conzept 16\c16_ftp_w32.dll', sModeSFTP);
if (tErr = _ErrOK)
{
// Establish connection
tErr # MdlFtp:Connect('myftp.de', 22, 'myuser', 'mypassword');
if (tErr = _ErrOK)
{
// Upload file ‘C:\Readme.txt’ to the root directory
tErr # MdlFtp:FileUpload('C:\Readme.txt', '/Readme.txt');
// Disconnect
MdlFtp:Disconnect();
}
// Terminate FTP module
MdlFtp:Term();
}
For which systems is the DLL available?
The DLL is available for Windows clients as a 32- and 64-bit version. It can therefore be used by the Standard and Advanced client as well as the SOA service on 32- and 64-bit systems. A version for the SOA service under Linux is also available as a 32- and 64-bit shared library.
How can you obtain the DLL?
A test version of the DLL, as well as a database with the interface and an application example, is available from vectorsoft support on request. All functions are included in the test version and can be tried out for 30 days.
Do you have any questions or suggestions?
Then don’t hesitate to leave them here as a comment.