aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ssl.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-07-16 13:25:35 +0200
committerMichael Mann <mmann78@netscape.net>2017-07-16 12:47:46 +0000
commit96ac279d986898e655fc18a3950caa6f5f214fe7 (patch)
tree5b270925ab46c74db37f8fbc559526d58187c2ee /epan/dissectors/packet-ssl.c
parentfeb510df69f56eb1c5662375518bd5138d6cd1c8 (diff)
ssl,dtls: make some fields in RSA keys dialog optional
The IP address has been unused since 2.0. The port/protocol fields have become unnecessary since 2.4 with the introduction of Decode As. Do not require the user to specify these fields if they just want to set the RSA key file. In a future version, these three fields will be completely removed. Change-Id: Iefc5a8778aa1122b76b707018c00b6ec429dc107 Reviewed-on: https://code.wireshark.org/review/22640 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-ssl.c')
-rw-r--r--epan/dissectors/packet-ssl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-ssl.c b/epan/dissectors/packet-ssl.c
index 869355b076..848fff1ef3 100644
--- a/epan/dissectors/packet-ssl.c
+++ b/epan/dissectors/packet-ssl.c
@@ -3815,8 +3815,9 @@ static gboolean
ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, char** err)
{
if (!p || strlen(p) == 0u) {
- *err = g_strdup("No protocol given.");
- return FALSE;
+ // This should be removed in favor of Decode As. Make it optional.
+ *err = NULL;
+ return TRUE;
}
if (!ssl_find_appdata_dissector(p)) {
@@ -4368,9 +4369,9 @@ proto_register_ssl(void)
#ifdef HAVE_LIBGNUTLS
static uat_field_t sslkeylist_uats_flds[] = {
- UAT_FLD_CSTRING_OTHER(sslkeylist_uats, ipaddr, "IP address", ssldecrypt_uat_fld_ip_chk_cb, "IPv4 or IPv6 address"),
- UAT_FLD_CSTRING_OTHER(sslkeylist_uats, port, "Port", ssldecrypt_uat_fld_port_chk_cb, "Port Number"),
- UAT_FLD_CSTRING_OTHER(sslkeylist_uats, protocol, "Protocol", ssldecrypt_uat_fld_protocol_chk_cb, "Protocol"),
+ UAT_FLD_CSTRING_OTHER(sslkeylist_uats, ipaddr, "IP address", ssldecrypt_uat_fld_ip_chk_cb, "IPv4 or IPv6 address (unused)"),
+ UAT_FLD_CSTRING_OTHER(sslkeylist_uats, port, "Port", ssldecrypt_uat_fld_port_chk_cb, "Port Number (optional)"),
+ UAT_FLD_CSTRING_OTHER(sslkeylist_uats, protocol, "Protocol", ssldecrypt_uat_fld_protocol_chk_cb, "Application Layer Protocol (optional)"),
UAT_FLD_FILENAME_OTHER(sslkeylist_uats, keyfile, "Key File", ssldecrypt_uat_fld_fileopen_chk_cb, "Private keyfile."),
UAT_FLD_CSTRING_OTHER(sslkeylist_uats, password,"Password", ssldecrypt_uat_fld_password_chk_cb, "Password (for PCKS#12 keyfile)"),
UAT_END_FIELDS