Skip to content

Commit

Permalink
vtls: Removed unimplemented overrides of curlssl_close_all()
Browse files Browse the repository at this point in the history
Carrying on from commit 037cd0d, removed the following unimplemented
instances of curlssl_close_all():

Curl_axtls_close_all()
Curl_darwinssl_close_all()
Curl_cyassl_close_all()
Curl_gskit_close_all()
Curl_gtls_close_all()
Curl_nss_close_all()
Curl_polarssl_close_all()
  • Loading branch information
captain-caveman2k committed Jan 17, 2015
1 parent 8bb3443 commit 5d5c78b
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 79 deletions.
8 changes: 1 addition & 7 deletions lib/vtls/axtls.c
Expand Up @@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2010, DirecTV, Contact: Eric Hu, <ehu@directv.com>.
* Copyright (C) 2010 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2010 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -515,12 +515,6 @@ static ssize_t axtls_send(struct connectdata *conn,
return rc;
}

void Curl_axtls_close_all(struct SessionHandle *data)
{
(void)data;
infof(data, " Curl_axtls_close_all\n");
}

void Curl_axtls_close(struct connectdata *conn, int sockindex)
{
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
Expand Down
6 changes: 1 addition & 5 deletions lib/vtls/axtls.h
Expand Up @@ -35,10 +35,6 @@ CURLcode Curl_axtls_connect_nonblocking(
int sockindex,
bool *done);

/* tell axTLS to close down all open information regarding connections (and
thus session ID caching etc) */
void Curl_axtls_close_all(struct SessionHandle *data);

/* close a SSL connection */
void Curl_axtls_close(struct connectdata *conn, int sockindex);

Expand All @@ -59,7 +55,7 @@ int Curl_axtls_random(struct SessionHandle *data,
#define curlssl_connect Curl_axtls_connect
#define curlssl_connect_nonblocking Curl_axtls_connect_nonblocking
#define curlssl_session_free(x) Curl_axtls_session_free(x)
#define curlssl_close_all Curl_axtls_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_axtls_close
#define curlssl_shutdown(x,y) Curl_axtls_shutdown(x,y)
#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
Expand Down
6 changes: 0 additions & 6 deletions lib/vtls/curl_darwinssl.c
Expand Up @@ -2229,12 +2229,6 @@ void Curl_darwinssl_close(struct connectdata *conn, int sockindex)
connssl->ssl_sockfd = 0;
}

void Curl_darwinssl_close_all(struct SessionHandle *data)
{
/* SecureTransport doesn't separate sessions from contexts, so... */
(void)data;
}

int Curl_darwinssl_shutdown(struct connectdata *conn, int sockindex)
{
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
Expand Down
5 changes: 1 addition & 4 deletions lib/vtls/curl_darwinssl.h
Expand Up @@ -32,9 +32,6 @@ CURLcode Curl_darwinssl_connect_nonblocking(struct connectdata *conn,
int sockindex,
bool *done);

/* this function doesn't actually do anything */
void Curl_darwinssl_close_all(struct SessionHandle *data);

/* close a SSL connection */
void Curl_darwinssl_close(struct connectdata *conn, int sockindex);

Expand All @@ -61,7 +58,7 @@ void Curl_darwinssl_md5sum(unsigned char *tmp, /* input */
#define curlssl_connect Curl_darwinssl_connect
#define curlssl_connect_nonblocking Curl_darwinssl_connect_nonblocking
#define curlssl_session_free(x) Curl_darwinssl_session_free(x)
#define curlssl_close_all Curl_darwinssl_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_darwinssl_close
#define curlssl_shutdown(x,y) 0
#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
Expand Down
7 changes: 1 addition & 6 deletions lib/vtls/cyassl.c
Expand Up @@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -393,11 +393,6 @@ static ssize_t cyassl_send(struct connectdata *conn,
return rc;
}

void Curl_cyassl_close_all(struct SessionHandle *data)
{
(void)data;
}

void Curl_cyassl_close(struct connectdata *conn, int sockindex)
{
struct ssl_connect_data *conssl = &conn->ssl[sockindex];
Expand Down
6 changes: 1 addition & 5 deletions lib/vtls/cyassl.h
Expand Up @@ -29,10 +29,6 @@ CURLcode Curl_cyassl_connect(struct connectdata *conn, int sockindex);
bool Curl_cyassl_data_pending(const struct connectdata* conn,int connindex);
int Curl_cyassl_shutdown(struct connectdata* conn, int sockindex);

/* tell CyaSSL to close down all open information regarding connections (and
thus session ID caching etc) */
void Curl_cyassl_close_all(struct SessionHandle *data);

/* close a SSL connection */
void Curl_cyassl_close(struct connectdata *conn, int sockindex);

Expand All @@ -56,7 +52,7 @@ int Curl_cyassl_random(struct SessionHandle *data,
#define curlssl_connect Curl_cyassl_connect
#define curlssl_connect_nonblocking Curl_cyassl_connect_nonblocking
#define curlssl_session_free(x) Curl_cyassl_session_free(x)
#define curlssl_close_all Curl_cyassl_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_cyassl_close
#define curlssl_shutdown(x,y) Curl_cyassl_shutdown(x,y)
#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
Expand Down
9 changes: 1 addition & 8 deletions lib/vtls/gskit.c
Expand Up @@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -986,13 +986,6 @@ void Curl_gskit_close(struct connectdata *conn, int sockindex)
}


void Curl_gskit_close_all(struct SessionHandle *data)
{
/* Unimplemented. */
(void) data;
}


int Curl_gskit_shutdown(struct connectdata *conn, int sockindex)
{
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
Expand Down
3 changes: 1 addition & 2 deletions lib/vtls/gskit.h
Expand Up @@ -36,7 +36,6 @@ CURLcode Curl_gskit_connect(struct connectdata * conn, int sockindex);
CURLcode Curl_gskit_connect_nonblocking(struct connectdata * conn,
int sockindex, bool * done);
void Curl_gskit_close(struct connectdata *conn, int sockindex);
void Curl_gskit_close_all(struct SessionHandle * data);
int Curl_gskit_shutdown(struct connectdata * conn, int sockindex);

size_t Curl_gskit_version(char * buffer, size_t size);
Expand All @@ -56,7 +55,7 @@ int Curl_gskit_check_cxn(struct connectdata * cxn);

/* No session handling for GSKit */
#define curlssl_session_free(x) Curl_nop_stmt
#define curlssl_close_all Curl_gskit_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_gskit_close
#define curlssl_shutdown(x,y) Curl_gskit_shutdown(x,y)
#define curlssl_set_engine(x,y) CURLE_NOT_BUILT_IN
Expand Down
6 changes: 0 additions & 6 deletions lib/vtls/gtls.c
Expand Up @@ -1217,12 +1217,6 @@ static ssize_t gtls_send(struct connectdata *conn,
return rc;
}

void Curl_gtls_close_all(struct SessionHandle *data)
{
/* FIX: make the OpenSSL code more generic and use parts of it here */
(void)data;
}

static void close_one(struct connectdata *conn,
int idx)
{
Expand Down
6 changes: 1 addition & 5 deletions lib/vtls/gtls.h
Expand Up @@ -35,10 +35,6 @@ CURLcode Curl_gtls_connect_nonblocking(struct connectdata *conn,
int sockindex,
bool *done);

/* tell GnuTLS to close down all open information regarding connections (and
thus session ID caching etc) */
void Curl_gtls_close_all(struct SessionHandle *data);

/* close a SSL connection */
void Curl_gtls_close(struct connectdata *conn, int sockindex);

Expand All @@ -64,7 +60,7 @@ bool Curl_gtls_cert_status_request(void);
#define curlssl_connect Curl_gtls_connect
#define curlssl_connect_nonblocking Curl_gtls_connect_nonblocking
#define curlssl_session_free(x) Curl_gtls_session_free(x)
#define curlssl_close_all Curl_gtls_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_gtls_close
#define curlssl_shutdown(x,y) Curl_gtls_shutdown(x,y)
#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
Expand Down
9 changes: 0 additions & 9 deletions lib/vtls/nss.c
Expand Up @@ -1260,15 +1260,6 @@ void Curl_nss_close(struct connectdata *conn, int sockindex)
}
}

/*
* This function is called when the 'data' struct is going away. Close
* down everything and free all resources!
*/
void Curl_nss_close_all(struct SessionHandle *data)
{
(void)data;
}

/* return true if NSS can provide error code (and possibly msg) for the
error */
static bool is_nss_error(CURLcode err)
Expand Down
6 changes: 1 addition & 5 deletions lib/vtls/nssg.h
Expand Up @@ -37,10 +37,6 @@ CURLcode Curl_nss_connect_nonblocking(struct connectdata *conn,
/* close a SSL connection */
void Curl_nss_close(struct connectdata *conn, int sockindex);

/* tell NSS to close down all open information regarding connections (and
thus session ID caching etc) */
void Curl_nss_close_all(struct SessionHandle *data);

int Curl_nss_init(void);
void Curl_nss_cleanup(void);

Expand Down Expand Up @@ -79,7 +75,7 @@ bool Curl_nss_cert_status_request(void);

/* NSS has its own session ID cache */
#define curlssl_session_free(x) Curl_nop_stmt
#define curlssl_close_all Curl_nss_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_nss_close
/* NSS has no shutdown function provided and thus always fail */
#define curlssl_shutdown(x,y) ((void)x, (void)y, 1)
Expand Down
7 changes: 1 addition & 6 deletions lib/vtls/polarssl.c
Expand Up @@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2010 - 2011, Hoi-Ho Chan, <hoiho.chan@gmail.com>
* Copyright (C) 2012 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 2012 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
Expand Down Expand Up @@ -544,11 +544,6 @@ static ssize_t polarssl_send(struct connectdata *conn,
return ret;
}

void Curl_polarssl_close_all(struct SessionHandle *data)
{
(void)data;
}

void Curl_polarssl_close(struct connectdata *conn, int sockindex)
{
rsa_free(&conn->ssl[sockindex].rsa);
Expand Down
6 changes: 1 addition & 5 deletions lib/vtls/polarssl.h
Expand Up @@ -37,10 +37,6 @@ CURLcode Curl_polarssl_connect_nonblocking(struct connectdata *conn,
int sockindex,
bool *done);

/* tell PolarSSL to close down all open information regarding connections (and
thus session ID caching etc) */
void Curl_polarssl_close_all(struct SessionHandle *data);

/* close a SSL connection */
void Curl_polarssl_close(struct connectdata *conn, int sockindex);

Expand All @@ -60,7 +56,7 @@ int Curl_polarssl_shutdown(struct connectdata *conn, int sockindex);
#define curlssl_connect Curl_polarssl_connect
#define curlssl_connect_nonblocking Curl_polarssl_connect_nonblocking
#define curlssl_session_free(x) Curl_polarssl_session_free(x)
#define curlssl_close_all Curl_polarssl_close_all
#define curlssl_close_all(x) ((void)x)
#define curlssl_close Curl_polarssl_close
#define curlssl_shutdown(x,y) 0
#define curlssl_set_engine(x,y) ((void)x, (void)y, CURLE_NOT_BUILT_IN)
Expand Down

0 comments on commit 5d5c78b

Please sign in to comment.