-
- // Check HMAC and decrypt.
- if(!digest_verify(&s->indigest, buffer, len - 14, buffer + len - 14))
- return error(s, EIO, "Invalid HMAC");
-
- cipher_set_counter(&s->incipher, &seqno, sizeof seqno);
- if(!cipher_counter_xor(&s->incipher, buffer + 6, len - 4, buffer + 6))
+ if(!cipher_set_counter(s->incipher, &seqno, sizeof seqno))
+ return false;
+ if(!cipher_counter_xor(s->incipher, buffer + 6, len - 4, buffer + 6))