aboutsummaryrefslogtreecommitdiffstats
path: root/sharkd.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-11-18 18:11:42 +0100
committerAnders Broman <a.broman58@gmail.com>2018-11-20 05:14:35 +0000
commitdf7af28f39b5b104fb85f76ddd9b887a74cf2d63 (patch)
treeadec02417c312fdd4c5f59eb6e45c11b785bc9b6 /sharkd.c
parente2e0fd1dbdb07f2a1bd8822ab86bcd7144025f97 (diff)
Add new Secrets API and allow TLS to use pcapng decryption secrets
Add a new secrets API to the core, one that can outlive the lifetime of a single capture file. Expose decryption secrets from wiretap through a callback and let the secrets API route it to a dissector. Bug: 15252 Change-Id: Ie2f1867bdfd265bad11fc58f1e8d8e7295c0d1e7 Reviewed-on: https://code.wireshark.org/review/30705 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'sharkd.c')
-rw-r--r--sharkd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sharkd.c b/sharkd.c
index bc35ced1f4..46d3a338a1 100644
--- a/sharkd.c
+++ b/sharkd.c
@@ -52,6 +52,7 @@
#include <epan/epan_dissect.h>
#include <epan/tap.h>
#include <epan/uat-int.h>
+#include <epan/secrets.h>
#include <codecs/codecs.h>
@@ -444,6 +445,7 @@ cf_open(capture_file *cf, const char *fname, unsigned int type, gboolean is_temp
wtap_set_cb_new_ipv4(cf->provider.wth, add_ipv4_name);
wtap_set_cb_new_ipv6(cf->provider.wth, (wtap_new_ipv6_callback_t) add_ipv6_name);
+ wtap_set_cb_new_secrets(cf->provider.wth, secrets_wtap_callback);
return CF_OK;