From 502cc61711173273ffb8be2cf895f5e79c3b47bc Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Wed, 26 Apr 2017 07:33:25 +0200 Subject: Move RSA key loading and decryption functions to wsutil Loading PEM and PKCS#11 keys was being done in static functions in packet-ssl-utils.c. These were moved to wsutil, with prototypes in a new header. This adds gnutls as optional dependency to wsutil. The RSA decryption helper was also moved and is now provided in . This allows more dissectors to access this functionality. Change-Id: I6cfbbf5203f2881c82bad721747834ccd76e2033 Reviewed-on: https://code.wireshark.org/review/21941 Reviewed-by: Peter Wu Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-dtls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'epan/dissectors/packet-dtls.c') diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c index 2dbf8532d6..9012a1d05b 100644 --- a/epan/dissectors/packet-dtls.c +++ b/epan/dissectors/packet-dtls.c @@ -61,6 +61,7 @@ #include #include #include +#include #include "packet-ssl-utils.h" #include "packet-dtls.h" @@ -252,7 +253,7 @@ dtls_parse_uat(void) /* parse private keys string, load available keys and put them in key hash*/ dtls_key_hash = g_hash_table_new_full(ssl_private_key_hash, - ssl_private_key_equal, g_free, ssl_private_key_free); + ssl_private_key_equal, g_free, rsa_private_key_free); ssl_set_debug(dtls_debug_file_name); -- cgit v1.2.3