From e07a6819d537e2a2a398a35420596b0f15c7de42 Mon Sep 17 00:00:00 2001 From: Jack Lloyd Date: Fri, 2 Nov 2018 09:34:59 -0400 Subject: Ensure this works even if par mult param is set to 1 As this paramater is technically a user configurable toggle. --- src/lib/modes/aead/gcm/gcm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/modes') diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp index bc48804e6..457c4831f 100644 --- a/src/lib/modes/aead/gcm/gcm.cpp +++ b/src/lib/modes/aead/gcm/gcm.cpp @@ -59,7 +59,7 @@ std::string GCM_Mode::provider() const size_t GCM_Mode::update_granularity() const { - return GCM_BS * BOTAN_BLOCK_CIPHER_PAR_MULT; + return GCM_BS * std::max(2, BOTAN_BLOCK_CIPHER_PAR_MULT); } bool GCM_Mode::valid_nonce_length(size_t len) const -- cgit v1.2.3