aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-04-07 15:27:13 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-04-07 15:27:13 +0000
commit6e619393824922118317689ef59a73c556b7ef98 (patch)
tree87adafabc035fe32f74e78cba20220986a8fe039 /lib/transfer.c
parent015a6181725a654fb6d1eb8ff55e116ea15dc89a (diff)
GnuTLS support added. There's now a "generic" SSL layer that we use all over
internally, with code provided by sslgen.c. All SSL-layer-specific code is then written in ssluse.c (for OpenSSL) and gtls.c (for GnuTLS). As far as possible, internals should not need to know what SSL layer that is in use. Building with GnuTLS currently makes two test cases fail. TODO.gnutls contains a few known outstanding issues for the GnuTLS support. GnuTLS support is enabled with configure --with-gnutls
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 7142d517b..a8858f173 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -94,7 +94,7 @@
#include "http.h"
#include "url.h"
#include "getinfo.h"
-#include "ssluse.h"
+#include "sslgen.h"
#include "http_digest.h"
#include "http_ntlm.h"
#include "http_negotiate.h"
@@ -243,6 +243,7 @@ CURLcode Curl_readrewind(struct connectdata *conn)
}
#ifdef USE_SSLEAY
+/* FIX: this is nasty OpenSSL-specific code that really shouldn't be here */
static int data_pending(struct connectdata *conn)
{
if(conn->ssl[FIRSTSOCKET].handle)
@@ -1597,20 +1598,17 @@ Transfer(struct connectdata *conn)
*/
CURLcode Curl_pretransfer(struct SessionHandle *data)
{
+ CURLcode res;
if(!data->change.url)
/* we can't do anything wihout URL */
return CURLE_URL_MALFORMAT;
-#ifdef USE_SSLEAY
- {
- /* Init the SSL session ID cache here. We do it here since we want to do
- it after the *_setopt() calls (that could change the size of the cache)
- but before any transfer takes place. */
- CURLcode res = Curl_SSL_InitSessions(data, data->set.ssl.numsessions);
- if(res)
- return res;
- }
-#endif
+ /* Init the SSL session ID cache here. We do it here since we want to do it
+ after the *_setopt() calls (that could change the size of the cache) but
+ before any transfer takes place. */
+ res = Curl_ssl_initsessions(data, data->set.ssl.numsessions);
+ if(res)
+ return res;
data->set.followlocation=0; /* reset the location-follow counter */
data->state.this_is_a_follow = FALSE; /* reset this */