diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-08-01 21:20:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-08-01 21:20:01 +0000 |
commit | 50c10aa5bf545eedfdbe561116656b6ec12654cd (patch) | |
tree | ae3de37fd3877d42ffd4c0cdcd03c4530e68a326 /lib/gtls.c | |
parent | 006878686cfd3faa9eca92fc8fe60cb8f8073a59 (diff) | |
download | curl-50c10aa5bf545eedfdbe561116656b6ec12654cd.tar.gz |
Patrick Monnerat and I modified libcurl so that now it *copies* all strings
passed to it with curl_easy_setopt()! Previously it has always just refered
to the data, forcing the user to keep the data around until libcurl is done
with it. That is now history and libcurl will instead clone the given
strings and keep private copies.
Diffstat (limited to 'lib/gtls.c')
-rw-r--r-- | lib/gtls.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/gtls.c b/lib/gtls.c index 03572d88e..a40ea096b 100644 --- a/lib/gtls.c +++ b/lib/gtls.c @@ -299,11 +299,13 @@ Curl_gtls_connect(struct connectdata *conn, if(rc < 0) return CURLE_SSL_CONNECT_ERROR; - if(data->set.cert) { + if(data->set.str[STRING_CERT]) { if( gnutls_certificate_set_x509_key_file( - conn->ssl[sockindex].cred, data->set.cert, - data->set.key != 0 ? data->set.key : data->set.cert, - do_file_type(data->set.cert_type) ) ) { + conn->ssl[sockindex].cred, + data->set.str[STRING_CERT], + data->set.str[STRING_KEY] ? + data->set.str[STRING_KEY] : data->set.str[STRING_CERT], + do_file_type(data->set.str[STRING_CERT_TYPE]) ) ) { failf(data, "error reading X.509 key or certificate file"); return CURLE_SSL_CONNECT_ERROR; } |