diff options
author | Ahmad Fatoum <ahmad@a3f.at> | 2017-04-26 07:33:25 +0200 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-06-05 23:43:03 +0000 |
commit | 502cc61711173273ffb8be2cf895f5e79c3b47bc (patch) | |
tree | 53db680580f3ca6a56461908330b9a30218a1449 /epan/dissectors/packet-dtls.c | |
parent | 1b228df643121ab2fabde34226701b9cd92401be (diff) |
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 <wsutil/rsa.h> header. This adds gnutls as optional
dependency to wsutil.
The RSA decryption helper was also moved and is now provided in
<wsutil/wsgcrypt.h>.
This allows more dissectors to access this functionality.
Change-Id: I6cfbbf5203f2881c82bad721747834ccd76e2033
Reviewed-on: https://code.wireshark.org/review/21941
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: 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-dtls.c')
-rw-r--r-- | epan/dissectors/packet-dtls.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <wsutil/str_util.h> #include <wsutil/strtoi.h> #include <wsutil/utf8_entities.h> +#include <wsutil/rsa.h> #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); |