]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Support GNUTLS_CRD_PSK and GNUTLS_CRD_IA.
authorSimon Josefsson <simon@josefsson.org>
Mon, 27 Aug 2007 14:37:53 +0000 (16:37 +0200)
committerSimon Josefsson <simon@josefsson.org>
Mon, 27 Aug 2007 14:37:53 +0000 (16:37 +0200)
doc/examples/ex-session-info.c

index 8bc4d0af021bb88d48ecc51c6c5b52ad925ebde8..a7b56fca9ea39705ba483f3dff887bab16d81608 100644 (file)
@@ -31,11 +31,22 @@ print_info (gnutls_session_t session)
   cred = gnutls_auth_get_type (session);
   switch (cred)
     {
+    case GNUTLS_CRD_IA:
+      printf ("- TLS/IA session\n");
+      break;
+
+
     case GNUTLS_CRD_SRP:
       printf ("- SRP session with username %s\n",
              gnutls_srp_server_get_username (session));
       break;
 
+    case GNUTLS_CRD_PSK:
+      if (gnutls_psk_server_get_username (session) != NULL)
+       printf ("- PSK authentication. Connected as '%s'\n",
+               gnutls_psk_server_get_username (session));
+      break;
+
     case GNUTLS_CRD_ANON:      /* anonymous authentication */
 
       printf ("- Anonymous DH using prime of %d bits\n",