From 0801cd399f4e21a57944fa71a24bcb7f21dc3af0 Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Thu, 16 Jul 2015 19:27:49 +0200 Subject: DTLS: fix compilation without libgcrypt or libgnutls Change-Id: I571f1ddaaa9579af65d558afc7162493a7393703 Reviewed-on: https://code.wireshark.org/review/9661 Reviewed-by: Pascal Quantin --- epan/dissectors/packet-dtls.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3