diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-11-02 08:48:13 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-11-02 08:48:13 +0000 |
commit | ecbf47ff3a402807f3ae1d361ce53a06bab19fe4 (patch) | |
tree | cb92b160b9360fa382e8fa9fc6444da747fa69e8 /epan/dissectors/packet-ssl.c | |
parent | d3c2aa3199c22502afd1649d275809391c6fe892 (diff) | |
download | wireshark-ecbf47ff3a402807f3ae1d361ce53a06bab19fe4.tar.gz wireshark-ecbf47ff3a402807f3ae1d361ce53a06bab19fe4.tar.bz2 wireshark-ecbf47ff3a402807f3ae1d361ce53a06bab19fe4.zip |
From Dirk:
This patch will print the information if an
invalid string was entered. It would be better to have a button to click on in
the UAT dialog to show valid values, but I don't know how I could do that with
the UAT system. So I'm simply printing it now in the error dialog, which should
be good enough.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7949
svn path=/trunk/; revision=45866
Diffstat (limited to 'epan/dissectors/packet-ssl.c')
-rw-r--r-- | epan/dissectors/packet-ssl.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c index b531fb19b3..ba05865fc7 100644 --- a/epan/dissectors/packet-ssl.c +++ b/epan/dissectors/packet-ssl.c @@ -437,6 +437,41 @@ ssl_parse_old_keys(void) /********************************************************************* * + * SSL Associations tree + * + *********************************************************************/ + +/** maximum size of ssl_association_info() string */ +#define SSL_ASSOC_MAX_LEN 8192 + +/** + * callback function used by ssl_association_info() to traverse the SSL associations. + */ +static gboolean +ssl_association_info_(gpointer key_ _U_, gpointer value_, gpointer s_) +{ + SslAssociation *value = value_; + gchar *s = s_; + const int l = strlen(s); + g_snprintf(s+l, SSL_ASSOC_MAX_LEN-l, "'%s' %s %i\n", value->info, value->tcp ? "TCP":"UDP", value->ssl_port); + return FALSE; +} + +extern GTree* ssl_associations; + +/** + * @return an information string on the SSL protocol associations. The string has ephemeral lifetime/scope. + */ +gchar* +ssl_association_info(void) +{ + gchar *s = ep_alloc0(SSL_ASSOC_MAX_LEN); + g_tree_foreach(ssl_associations, ssl_association_info_, s); + return s; +} + +/********************************************************************* + * * Forward Declarations * *********************************************************************/ |