aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-11-02 09:34:59 -0400
committerJack Lloyd <[email protected]>2018-11-02 09:34:59 -0400
commite07a6819d537e2a2a398a35420596b0f15c7de42 (patch)
treebd29a308acc2961097655db0d0b6d95b8175be1c /src/lib/modes
parent6c0b88066dd81deba23537e4d718291e9cfda7dd (diff)
Ensure this works even if par mult param is set to 1
As this paramater is technically a user configurable toggle.
Diffstat (limited to 'src/lib/modes')
-rw-r--r--src/lib/modes/aead/gcm/gcm.cpp2
1 files changed, 1 insertions, 1 deletions
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<size_t>(2, BOTAN_BLOCK_CIPHER_PAR_MULT);
}
bool GCM_Mode::valid_nonce_length(size_t len) const