aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/wtap.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 /wiretap/wtap.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 'wiretap/wtap.c')
-rw-r--r--wiretap/wtap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/wiretap/wtap.c b/wiretap/wtap.c
index a9ec1e35bd..a19237209f 100644
--- a/wiretap/wtap.c
+++ b/wiretap/wtap.c
@@ -1258,6 +1258,11 @@ void wtap_set_cb_new_ipv6(wtap *wth, wtap_new_ipv6_callback_t add_new_ipv6) {
wth->add_new_ipv6 = add_new_ipv6;
}
+void wtap_set_cb_new_secrets(wtap *wth, wtap_new_secrets_callback_t add_new_secrets) {
+ if (wth)
+ wth->add_new_secrets = add_new_secrets;
+}
+
gboolean
wtap_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
{