emrtd: Improve comment on USA quirk workaround

This commit is contained in:
Ave 2020-12-29 20:05:50 +03:00
parent ee87abd047
commit ff4acf7005

View file

@ -218,9 +218,9 @@ static int emrtd_get_asn1_data_length(uint8_t *datain, int datainlen, int offset
if (lenfield <= 0x7f) {
return lenfield;
} else if (lenfield == 0x80) {
// TODO: 0x80 means indeterminate.
// TODO: 0x80 means indeterminate, and this impl is a workaround.
// Giving rest of the file is a workaround, nothing more, nothing less.
// More at https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/
// https://wf.lavatech.top/ave-but-random/emrtd-data-quirks#EF_SOD
return datainlen;
} else if (lenfield == 0x81) {
return ((int) * (datain + offset + 1));