QUIC: fix build with older Libgcrypt

RHEL7 ships with Libgcrypt 1.5.3 which does not support AEAD, add guards
to fix -Wunused-function errors.

Change-Id: I230a66eff0dca9a882bf87f2f740ee0d36cd1dc6
Reviewed-on: https://code.wireshark.org/review/25434
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
Richard Sharpe 2018-01-23 19:21:10 +01:00 committed by Alexis La Goutte
parent 7ecf93c833
commit 6605d844af
1 changed files with 4 additions and 0 deletions

View File

@ -330,6 +330,7 @@ static const value_string quic_error_code_vals[] = {
static value_string_ext quic_error_code_vals_ext = VALUE_STRING_EXT_INIT(quic_error_code_vals);
#ifdef HAVE_LIBGCRYPT_AEAD
static guint32 get_len_offset(guint8 frame_type){
switch((frame_type & FTFLAGS_STREAM_OO) >> 1){
@ -411,6 +412,7 @@ static guint32 get_len_ack_block(guint8 frame_type){
}
return 1;
}
#endif /* HAVE_LIBGCRYPT_AEAD */
static guint32 get_len_packet_number(guint8 short_packet_type){
@ -433,6 +435,7 @@ static guint32 get_len_packet_number(guint8 short_packet_type){
return 1;
}
#ifdef HAVE_LIBGCRYPT_AEAD
static int
dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *quic_tree, guint offset, quic_info_data_t *quic_info){
proto_item *ti_ft, *ti_ftflags;
@ -922,6 +925,7 @@ dissect_quic_frame_type(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *quic_
return offset;
}
#endif /* HAVE_LIBGCRYPT_AEAD */
/* TLS 1.3 draft used by the draft-ietf-quic-tls-07 */
#define QUIC_TLS13_VERSION 21