Mercurial > gftp.yaz
diff lib/sslcommon.c @ 169:d40f9db52cdf
2003-6-8 Brian Masney <masneyb@gftp.org>
* lib/https.c lib/options.h lib/sslcommon.c - make sure USE_SSL is
defined before using any SSL functions
* lib/gftp.h lib/protocols.c lib/rfc2068.c lib/sshv2.c lib/sslcommon.c
lib/rfc959.c - make sure we use request->datafd for the connection. Removed
sockfd from gftp_request structure
* lib/rfc959.c - add data_connection to rfc959_parms structure. Use
this for the FTP data connection
* src/text/gftp-text.c - fixes for username/password prompt
* src/gtk/misc-gtk.c src/gtk/transfer.c - s/sockfd/datafd/g
* configure.in - added lib/Makefile (forgot to commit last time)
* Makefile.am - added intl to SUBDIRS
author | masneyb |
---|---|
date | Sun, 08 Jun 2003 15:49:02 +0000 |
parents | c505d9ba9d53 |
children | 4c288d05b26a |
line wrap: on
line diff
--- a/lib/sslcommon.c Sun Jun 08 15:04:40 2003 +0000 +++ b/lib/sslcommon.c Sun Jun 08 15:49:02 2003 +0000 @@ -24,9 +24,9 @@ /* Some of the functions in here was taken either entirely or partially from * the O'Reilly book Network Security with OpenSSL */ +#ifdef USE_SSL + static SSL_CTX * ctx = NULL; - -#ifdef USE_SSL static volatile int gftp_ssl_initialized = 0; @@ -184,7 +184,7 @@ BIO * bio; long ret; - g_return_val_if_fail (request->sockfd > 0, GFTP_EFATAL); + g_return_val_if_fail (request->datafd > 0, GFTP_EFATAL); if (!gftp_ssl_initialized) { @@ -193,7 +193,7 @@ return (GFTP_EFATAL); } - if (gftp_fd_set_sockblocking (request, request->sockfd, 0) < 0) /* FIXME */ + if (gftp_fd_set_sockblocking (request, request->datafd, 0) < 0) /* FIXME */ { gftp_disconnect (request); return (GFTP_ERETRYABLE); @@ -206,7 +206,7 @@ return (GFTP_EFATAL); } - BIO_set_fd (bio, request->sockfd, BIO_NOCLOSE); + BIO_set_fd (bio, request->datafd, BIO_NOCLOSE); if ((request->ssl = SSL_new (ctx)) == NULL) {