From: Simon Josefsson Date: Wed, 4 Jun 2008 06:03:58 +0000 (+0200) Subject: Update example with more PSK printing. X-Git-Tag: gnutls_2_3_12~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6aea6e159330e2a7a00817deff33546af37c8a18;p=thirdparty%2Fgnutls.git Update example with more PSK printing. --- diff --git a/doc/examples/ex-session-info.c b/doc/examples/ex-session-info.c index e7856da4a8..382b038185 100644 --- a/doc/examples/ex-session-info.c +++ b/doc/examples/ex-session-info.c @@ -51,6 +51,13 @@ print_info (gnutls_session_t session) #endif case GNUTLS_CRD_PSK: + /* This returns NULL in server side. + */ + if (gnutls_psk_client_get_hint (session) != NULL) + printf ("- PSK authentication. PSK hint '%s'\n", + gnutls_psk_client_get_hint (session)); + /* This returns NULL in client side. + */ if (gnutls_psk_server_get_username (session) != NULL) printf ("- PSK authentication. Connected as '%s'\n", gnutls_psk_server_get_username (session));