summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-dtls.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-07-16 19:27:49 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2015-07-16 17:29:33 +0000
commit0801cd399f4e21a57944fa71a24bcb7f21dc3af0 (patch)
tree6d7cc23c5cc1b9f81f0a522f3aac48938e0aa8f5 /epan/dissectors/packet-dtls.c
parent6fcfb5ed56c09af30ed50c4fe41103436f8b91cc (diff)
downloadwireshark-0801cd399f4e21a57944fa71a24bcb7f21dc3af0.tar.gz
DTLS: fix compilation without libgcrypt or libgnutls
Change-Id: I571f1ddaaa9579af65d558afc7162493a7393703 Reviewed-on: https://code.wireshark.org/review/9661 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dtls.c')
-rw-r--r--epan/dissectors/packet-dtls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index ea11d6f313..b432a80493 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -343,7 +343,9 @@ dissect_dtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
SslSession *session;
gint is_from_server;
gboolean conv_first_seen;
+#if defined(HAVE_LIBGNUTLS) && defined(HAVE_LIBGCRYPT)
Ssl_private_key_t *private_key;
+#endif
ti = NULL;
dtls_tree = NULL;
@@ -383,6 +385,7 @@ dissect_dtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ssl_debug_printf("dissect_dtls server %s:%d\n",
address_to_str(wmem_packet_scope(), &dummy.addr),dummy.port);
+#if defined(HAVE_LIBGNUTLS) && defined(HAVE_LIBGCRYPT)
/* try to retrieve private key for this service. Do it now 'cause pinfo
* is not always available
* Note that with HAVE_LIBGNUTLS undefined private_key is always 0
@@ -394,6 +397,7 @@ dissect_dtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
else {
ssl_session->private_key = private_key->sexp_pkey;
}
+#endif
}
session = &ssl_session->session;
is_from_server = ssl_packet_from_server(session, dtls_associations, pinfo);