Use has_more in decrypt_payloads instead of calling enumerate twice.
This commit is contained in:
1 parent
1142726ba0
commit
a07568cf6a
1 file changed
+1
-1
@@ -1312,7 +1312,7 @@ static status_t decrypt_payloads(private_message_t *this, aead_t *aead)
|
||||
|
||||
DBG2(DBG_ENC, "found an encryption payload");
|
||||
|
||||
if (enumerator->enumerate(enumerator, &payload))
|
||||
if (this->payloads->has_more(this->payloads, enumerator))
|
||||
{
|
||||
DBG1(DBG_ENC, "encrypted payload is not last payload");
|
||||
status = VERIFY_ERROR;
|
||||
|
||||
Reference in new issue
Block a user