diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-22 17:28:02 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-09-22 17:28:02 +0200 |
commit | 06ef6e616fb08a6db4499f6bb64f99bed1a03043 (patch) | |
tree | d16c51103a23c2961ec6535ac36a00d650bb8f1b /src | |
parent | 6d967fd54ecd1cb7e5034a60e50bb91cf2381667 (diff) | |
download | gnutls-06ef6e616fb08a6db4499f6bb64f99bed1a03043.tar.gz |
print session ID
Diffstat (limited to 'src')
-rw-r--r-- | src/common.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c index 07687b810b..cee7a92aae 100644 --- a/src/common.c +++ b/src/common.c @@ -1,6 +1,5 @@ /* - * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, - * 2009, 2010 Free Software Foundation, Inc. + * Copyright (C) 2000-2011 Free Software Foundation, Inc. * Author: Nikos Mavrogiannopoulos * * This file is part of GnuTLS. @@ -413,7 +412,12 @@ print_info (gnutls_session_t session, const char *hostname, int insecure) const char *tmp; gnutls_credentials_type_t cred; gnutls_kx_algorithm_t kx; + unsigned char session_id[33]; + size_t session_id_size = sizeof(session_id); + /* print session ID */ + gnutls_session_get_id (session, session_id, &session_id_size); + printf("- Session ID: %s\n", raw_to_string(session_id, session_id_size)); /* print the key exchange's algorithm name */ |