Use has_more in decrypt_payloads instead of calling enumerate twice.

This commit is contained in:
Tobias Brunner
2011-07-06 09:43:46 +02:00
parent 1142726ba0
commit a07568cf6a
+1 -1
View File
@@ -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;