aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-11 22:56:36 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-11 22:56:36 +0000
commitc8ac7a0d95178ce7852764005de1e1d350791ab0 (patch)
treedddd24dacc329769c9c0c5d3126b90ddba928288 /lib
parent44031f32a149e9d4097b77c1e998db03887d209c (diff)
Dominick Meglio pointed out FTPS should use default port 990 according to
IANA.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c6
-rw-r--r--lib/urldata.h1
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index aee9e16d2..4b71e070f 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2441,11 +2441,13 @@ static CURLcode CreateConnection(struct SessionHandle *data,
/* MN 06/07/02 */
#ifndef CURL_DISABLE_FTP
char *type;
+ int port = PORT_FTP;
if(strequal(conn->protostr, "FTPS")) {
#ifdef USE_SSLEAY
conn->protocol |= PROT_FTPS|PROT_SSL;
conn->ssl[SECONDARYSOCKET].use = TRUE; /* send data securely */
+ port = PORT_FTPS;
#else
failf(data, LIBCURL_NAME
" was built with SSL disabled, ftps: not supported!");
@@ -2454,8 +2456,8 @@ static CURLcode CreateConnection(struct SessionHandle *data,
}
conn->port = (data->set.use_port && data->state.allow_port)?
- data->set.use_port:PORT_FTP;
- conn->remote_port = PORT_FTP;
+ data->set.use_port:port;
+ conn->remote_port = port;
conn->protocol |= PROT_FTP;
if(data->change.proxy &&
diff --git a/lib/urldata.h b/lib/urldata.h
index ce84b5b2b..7403bd731 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -28,6 +28,7 @@
#include "setup.h"
#define PORT_FTP 21
+#define PORT_FTPS 990
#define PORT_TELNET 23
#define PORT_GOPHER 70
#define PORT_HTTP 80