Mercurial > gftp.yaz
comparison lib/https.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 |
comparison
equal
deleted
inserted
replaced
| 168:c505d9ba9d53 | 169:d40f9db52cdf |
|---|---|
| 20 #include "gftp.h" | 20 #include "gftp.h" |
| 21 #include "httpcommon.h" | 21 #include "httpcommon.h" |
| 22 | 22 |
| 23 static const char cvsid[] = "$Id$"; | 23 static const char cvsid[] = "$Id$"; |
| 24 | 24 |
| 25 #ifdef USE_SSL | |
| 25 static int | 26 static int |
| 26 https_get_next_file (gftp_request * request, gftp_file * fle, int fd) | 27 https_get_next_file (gftp_request * request, gftp_file * fle, int fd) |
| 27 { | 28 { |
| 28 rfc2068_params * params; | 29 rfc2068_params * params; |
| 29 int ret, resetptr; | 30 int ret, resetptr; |
| 46 request->write_function = gftp_ssl_write; | 47 request->write_function = gftp_ssl_write; |
| 47 } | 48 } |
| 48 | 49 |
| 49 return (ret); | 50 return (ret); |
| 50 } | 51 } |
| 51 | 52 #endif |
| 52 | 53 |
| 53 void | 54 void |
| 54 https_register_module (void) | 55 https_register_module (void) |
| 55 { | 56 { |
| 57 #ifdef USE_SSL | |
| 56 gftp_ssl_startup (NULL); /* FIXME - take out of here */ | 58 gftp_ssl_startup (NULL); /* FIXME - take out of here */ |
| 59 #endif | |
| 57 } | 60 } |
| 58 | 61 |
| 59 | 62 |
| 60 void | 63 void |
| 61 https_init (gftp_request * request) | 64 https_init (gftp_request * request) |
| 62 { | 65 { |
| 66 #ifdef USE_SSL | |
| 63 rfc2068_params * params; | 67 rfc2068_params * params; |
| 64 | 68 |
| 65 g_return_if_fail (request != NULL); | 69 g_return_if_fail (request != NULL); |
| 66 | 70 |
| 67 gftp_protocols[GFTP_HTTP_NUM].init (request); | 71 gftp_protocols[GFTP_HTTP_NUM].init (request); |
| 70 request->post_connect = gftp_ssl_session_setup; | 74 request->post_connect = gftp_ssl_session_setup; |
| 71 params->real_read_function = gftp_ssl_read; | 75 params->real_read_function = gftp_ssl_read; |
| 72 request->write_function = gftp_ssl_write; | 76 request->write_function = gftp_ssl_write; |
| 73 request->get_next_file = https_get_next_file; | 77 request->get_next_file = https_get_next_file; |
| 74 request->url_prefix = g_strdup ("https"); | 78 request->url_prefix = g_strdup ("https"); |
| 79 #else | |
| 80 gftp_protocols[GFTP_HTTP_NUM].init (request); | |
| 81 | |
| 82 request->logging_function (gftp_logging_error, request->user_data, | |
| 83 _("HTTPS Support unavailable since SSL support was not compiled in. Reverting back to plaintext\n")); | |
| 84 #endif | |
| 75 } | 85 } |
| 76 | 86 |
