]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update example with more PSK printing.
authorSimon Josefsson <simon@josefsson.org>
Wed, 4 Jun 2008 06:03:58 +0000 (08:03 +0200)
committerSimon Josefsson <simon@josefsson.org>
Wed, 4 Jun 2008 06:03:58 +0000 (08:03 +0200)
doc/examples/ex-session-info.c

index e7856da4a8e3c4f394b2092e17a09dcdc830a190..382b0381854b769cca0d39919868fab77e22ecae 100644 (file)
@@ -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));