summaryrefslogtreecommitdiff
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2015-02-16 15:14:57 -0500
committerMichael Mann <mmann78@netscape.net>2015-02-17 14:08:40 +0000
commita355daf328d9c07947565a6f0f07a4407f4367c8 (patch)
tree6a1eaecf62551183a811fa32083fd1790e3585a3 /epan/dissectors
parent0da88ba505188518a1b9ba055ccfc5e01d4ec505 (diff)
downloadwireshark-a355daf328d9c07947565a6f0f07a4407f4367c8.tar.gz
Give users a more helpful error message if they enter an SSL protocol we don't
know. First, if we know the protocol (by filter name) tell them that the dissector just isn't set up to run over SSL but it could be--if they contact the Wireshark developers. Second, don't tell them that the dissectors which have called ssl_dissector_add() are the only ones that are valid; those are just commonly used ones. Change-Id: I1b72bccd4c96c21c73a19fa2d87fe2c0b875a0fa Reviewed-on: https://code.wireshark.org/review/7185 Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-ssl-utils.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c
index 9d2010f45b..6e7b244c1f 100644
--- a/epan/dissectors/packet-ssl-utils.c
+++ b/epan/dissectors/packet-ssl-utils.c
@@ -4927,9 +4927,15 @@ ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, guint len _U_, co
}
if (!find_dissector(p)) {
- char* ssl_str = ssl_association_info();
- *err = g_strdup_printf("Could not find dissector for: '%s'\nValid dissectors are:\n%s", p, ssl_str);
- g_free(ssl_str);
+ if (proto_get_id_by_filter_name(p) != -1) {
+ *err = g_strdup_printf("While '%s' is a valid dissector filter name, that dissector is not configured"
+ " to support SSL decryption.\n\n"
+ "If you need to decrypt '%s' over SSL, please contact the Wireshark development team.", p, p);
+ } else {
+ char* ssl_str = ssl_association_info();
+ *err = g_strdup_printf("Could not find dissector for: '%s'\nCommonly used SSL dissectors include:\n%s", p, ssl_str);
+ g_free(ssl_str);
+ }
return FALSE;
}