- if(!cipher_counter_xor(s->incipher, s->inbuf + 4, 2, &s->reclen))
- return false;
+ if(!cipher_set_counter(s->incipher, &seqno, 4))
+ return error(s, EINVAL, "Failed to set counter");
+
+ if(!cipher_gcm_decrypt_start(s->incipher, s->inbuf, 2, &s->reclen, NULL))
+ return error(s, EINVAL, "Failed to decrypt record");