summaryrefslogtreecommitdiff
path: root/lib/vtls/gtls.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2017-06-23 16:05:26 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-08-28 14:56:57 +0200
commit69039fd1fa3e65e2f5737b2a4044dcb8fbabb76d (patch)
tree45490b3472aea76af548851766c1a26aa98b5d22 /lib/vtls/gtls.c
parent118b074fba6ac9d8128410ce14cd05d46ad6dfa5 (diff)
downloadcurl-69039fd1fa3e65e2f5737b2a4044dcb8fbabb76d.tar.gz
getinfo: access SSL internals via Curl_ssl
In the ongoing endeavor to abstract out all SSL backend-specific functionality, this is the next step: Instead of hard-coding how the different SSL backends access their internal data in getinfo.c, let's implement backend-specific functions to do that task. This will also allow for switching SSL backends as a runtime option. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Diffstat (limited to 'lib/vtls/gtls.c')
-rw-r--r--lib/vtls/gtls.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/vtls/gtls.c b/lib/vtls/gtls.c
index 54fda5467..1e57b4588 100644
--- a/lib/vtls/gtls.c
+++ b/lib/vtls/gtls.c
@@ -1782,6 +1782,13 @@ static bool Curl_gtls_cert_status_request(void)
#endif
}
+static void *Curl_gtls_get_internals(struct ssl_connect_data *connssl,
+ CURLINFO info UNUSED_PARAM)
+{
+ (void)info;
+ return connssl->session;
+}
+
const struct Curl_ssl Curl_ssl_gnutls = {
"gnutls", /* name */
@@ -1801,6 +1808,7 @@ const struct Curl_ssl Curl_ssl_gnutls = {
Curl_gtls_cert_status_request, /* cert_status_request */
Curl_gtls_connect, /* connect */
Curl_gtls_connect_nonblocking, /* connect_nonblocking */
+ Curl_gtls_get_internals, /* get_internals */
Curl_gtls_close, /* close */
Curl_none_close_all, /* close_all */
Curl_glts_session_free, /* session_free */