diff options
author | Nikos Mavrogiannopoulos <nmav@crystal.(none)> | 2008-06-23 02:15:58 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@crystal.(none)> | 2008-06-23 02:15:58 +0300 |
commit | ea88f2a86c00a9b5afca523e30fd9e77adda373d (patch) | |
tree | 3402a61baa9df4c9fd12365de11af55baf387979 /doc/examples/ex-session-info.c | |
parent | e6864717c4da368f81453d515a311476e2ac196b (diff) | |
download | gnutls_with_ext_mpi.tar.gz |
merged with master.gnutls_with_ext_mpi
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)); |