From faabde7649be638b3be42e83be0bf367741d38a1 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 22 Jun 2012 09:08:03 +0000 Subject: [PATCH] -fixing #2443: tutorial was unclear --- doc/chapters/tlsauthentication.inc | 7 +++++-- doc/examples/tlsauthentication.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/chapters/tlsauthentication.inc b/doc/chapters/tlsauthentication.inc index 278a3ba5..f945544e 100644 --- a/doc/chapters/tlsauthentication.inc +++ b/doc/chapters/tlsauthentication.inc @@ -157,8 +157,11 @@ obtain the raw GnuTLS session handle from @emph{MHD} using #include gnutls_session_t tls_session; -tls_session = MHD_get_connection_info (connection, - MHD_CONNECTION_INFO_GNUTLS_SESSION); +union MHD_ConnectionInfo *ci; + +ci = MHD_get_connection_info (connection, + MHD_CONNECTION_INFO_GNUTLS_SESSION); +tls_session = ci->tls_session; @end verbatim You can then extract the client certificate: diff --git a/doc/examples/tlsauthentication.c b/doc/examples/tlsauthentication.c index 7d6e66f5..01006d50 100644 --- a/doc/examples/tlsauthentication.c +++ b/doc/examples/tlsauthentication.c @@ -13,7 +13,7 @@ #define SERVERCERTFILE "server.pem" -char * +static char * string_to_base64 (const char *message) { const char *lookup =