summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-25 12:44:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-28 14:56:57 +0200
commit3ea5461d4efe1e3c781fe9cb32778e298a0bc92a (patch)
tree3849a6d204dde8c8ce014404436083289315c016
parentf0b4db1ab0f803fdad576d77220434d04651db76 (diff)
downloadcurl-3ea5461d4efe1e3c781fe9cb32778e298a0bc92a.tar.gz
axtls: reorder functions topologically
The connect_finish() function (like many other functions after it) calls the Curl_axtls_close() function; While this is not a problem now (because axtls.h declares the latter function), a patch looming in the immediate future with make all of these functions file-local. So let's just move the Curl_axtls_close() function's definition before it is called. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
-rw-r--r--lib/vtls/axtls.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/vtls/axtls.c b/lib/vtls/axtls.c
index 12c3a4fff..bd7498aad 100644
--- a/lib/vtls/axtls.c
+++ b/lib/vtls/axtls.c
@@ -284,6 +284,22 @@ static CURLcode connect_prep(struct connectdata *conn, int sockindex)
return CURLE_OK;
}
+void Curl_axtls_close(struct connectdata *conn, int sockindex)
+{
+ struct ssl_connect_data *connssl = &conn->ssl[sockindex];
+
+ infof(conn->data, " Curl_axtls_close\n");
+
+ /* line from openssl.c: (void)SSL_shutdown(connssl->ssl);
+ axTLS compat layer does nothing for SSL_shutdown */
+
+ /* The following line is from openssl.c. There seems to be no axTLS
+ equivalent. ssl_free and ssl_ctx_free close things.
+ SSL_set_connect_state(connssl->handle); */
+
+ free_ssl_structs(connssl);
+}
+
/*
* For both blocking and non-blocking connects, this function finalizes the
* SSL connection.
@@ -543,22 +559,6 @@ static ssize_t axtls_send(struct connectdata *conn,
return rc;
}
-void Curl_axtls_close(struct connectdata *conn, int sockindex)
-{
- struct ssl_connect_data *connssl = &conn->ssl[sockindex];
-
- infof(conn->data, " Curl_axtls_close\n");
-
- /* line from openssl.c: (void)SSL_shutdown(connssl->ssl);
- axTLS compat layer does nothing for SSL_shutdown */
-
- /* The following line is from openssl.c. There seems to be no axTLS
- equivalent. ssl_free and ssl_ctx_free close things.
- SSL_set_connect_state(connssl->handle); */
-
- free_ssl_structs(connssl);
-}
-
/*
* This function is called to shut down the SSL layer but keep the
* socket open (CCC - Clear Command Channel)