diff options
Diffstat (limited to 'doc/examples/ex-session-info.c')
-rw-r--r-- | doc/examples/ex-session-info.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/doc/examples/ex-session-info.c b/doc/examples/ex-session-info.c index dded275152..382b038185 100644 --- a/doc/examples/ex-session-info.c +++ b/doc/examples/ex-session-info.c @@ -1,4 +1,4 @@ -/* Copyright 2007 Free Software Foundation +/* Copyright 2007, 2008 Free Software Foundation * * Copying and distribution of this file, with or without modification, * are permitted in any medium without royalty provided the copyright @@ -43,12 +43,21 @@ print_info (gnutls_session_t session) break; +#ifdef ENABLE_SRP case GNUTLS_CRD_SRP: printf ("- SRP session with username %s\n", gnutls_srp_server_get_username (session)); break; +#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)); |