In the NTS-KE client don't reject the response if it has non-critical
records that are too long for the processing buffer. This is not
expected to happen with the current specification, but it might be
needed with future extensions.
Fixes: 7925ed39b81f ("nts: fix handling of long server negotiation record")
break;
if (length > sizeof (data)) {
- DEBUG_LOG("Record too long type=%d length=%d", type, length);
- error = 1;
- break;
+ DEBUG_LOG("Record too long type=%d length=%d critical=%d", type, length, critical);
+ if (critical)
+ error = 1;
+ continue;
}
switch (type) {