diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-07-17 02:01:22 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-07-17 09:02:24 +0000 |
commit | d1fcb7dd3482decd70bc3da6fbdef81800f0320f (patch) | |
tree | d2acb2ffcc6d0a5a1250a4a5e3c38c286b241d8b /epan/dissectors/packet-ssl-utils.c | |
parent | 5a9e438b05d0eef54e3516905554641da301562c (diff) |
Report an error if we fail to open the keylog file.
That way, we don't just silently fail.
Change-Id: I924f4387f6efdc342f6b02ed29796802567c1884
Reviewed-on: https://code.wireshark.org/review/9683
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'epan/dissectors/packet-ssl-utils.c')
-rw-r--r-- | epan/dissectors/packet-ssl-utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-ssl-utils.c b/epan/dissectors/packet-ssl-utils.c index 20e8f30bd6..9ed2271b07 100644 --- a/epan/dissectors/packet-ssl-utils.c +++ b/epan/dissectors/packet-ssl-utils.c @@ -4746,9 +4746,14 @@ ssl_load_keyfile(const gchar *ssl_keylog_filename, FILE **keylog_file, } if (*keylog_file == NULL) { + errno = 0; *keylog_file = ws_fopen(ssl_keylog_filename, "r"); if (!*keylog_file) { - ssl_debug_printf("%s failed to open SSL keylog\n", G_STRFUNC); + /* + * This shouldn't fail, not even with ENOENT, as the user + * supplied the pathname. + */ + report_open_failure(ssl_keylog_filename, errno, FALSE); return; } } |