From 677089488416205622a4b6aaabc5d50370e663b5 Mon Sep 17 00:00:00 2001 From: gambas Date: Wed, 25 Oct 2017 20:38:42 +0200 Subject: [PATCH] FtpClient: Allow 'ftps://' protocol. [GB.NET.CURL] * NEW: FtpClient: Allow 'ftps://' protocol. --- gb.net.curl/src/gb.net.curl/.src/MMain.module | 18 +++++++++++++++++- gb.net.curl/src/gbcurl.c | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gb.net.curl/src/gb.net.curl/.src/MMain.module b/gb.net.curl/src/gb.net.curl/.src/MMain.module index 9f440df94..e55a0f720 100644 --- a/gb.net.curl/src/gb.net.curl/.src/MMain.module +++ b/gb.net.curl/src/gb.net.curl/.src/MMain.module @@ -2,6 +2,22 @@ Public Sub Main() - Print HttpClient.Download("https://www.w3schools.com/cssref/") + 'Print HttpClient.Download("https://www.w3schools.com/cssref/") + + Dim ftptest As New FtpClient + Dim tmp As String + + tmp = Temp() + ftptest.URL = "ftps://intersindical-clm.org" + ftptest.User = "benoit" + ftptest.Password = "vohW827!" + ftptest.SSL.VerifyHost = True + ftptest.SSL.VerifyPeer = False + ftptest.debug = True + ftptest.Async = False + ftptest.get(tmp) + If ftptest.ErrorText > "" Then + Print "Connection failed" + Endif End diff --git a/gb.net.curl/src/gbcurl.c b/gb.net.curl/src/gbcurl.c index 2e43b15ae..26a45cdf6 100644 --- a/gb.net.curl/src/gbcurl.c +++ b/gb.net.curl/src/gbcurl.c @@ -33,7 +33,7 @@ #include "gbcurl.h" #include "CCurl.h" -static char *_protocols[] = { "ftp://", "http://", "https://", NULL }; +static char *_protocols[] = { "ftp://", "ftps://", "http://", "https://", NULL }; static void warning(const char *msg) {