1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-27 02:07:12 +00:00

ARC improvements

This commit is contained in:
M66B 2023-03-17 09:56:27 +01:00
parent 876ee65c90
commit 115a98b6fe

View file

@ -2068,13 +2068,11 @@ public class MessageHelper {
break; break;
} }
ok = (ok && as.size() > 0); if (ok)
Log.i("ARC as=" + as.size() + " aar=" + aar.size() + " ams=" + ams.size() + " ok=" + ok); ok = (as.size() > 0 && as.size() <= 50 &&
as.size() == aar.size() && as.size() == ams.size());
if (ok && if (ok)
as.size() <= 50 &&
as.size() == aar.size() &&
as.size() == ams.size()) {
for (int i = 1; i <= as.size(); i++) { for (int i = 1; i <= as.size(); i++) {
// 3.B. The instance values of the ARC Sets MUST form a continuous sequence from 1..N with no gaps or repetition // 3.B. The instance values of the ARC Sets MUST form a continuous sequence from 1..N with no gaps or repetition
if (!as.containsKey(i) || !aar.containsKey(i) || !ams.containsKey(i)) { if (!as.containsKey(i) || !aar.containsKey(i) || !ams.containsKey(i)) {
@ -2094,8 +2092,7 @@ public class MessageHelper {
break; break;
} }
} }
} Log.i("ARC as=" + as.size() + " aar=" + aar.size() + " ams=" + ams.size() + " ok=" + ok);
Log.i("ARC sets=" + ok);
// 4. Validate the AMS with the greatest instance value (most recent). // 4. Validate the AMS with the greatest instance value (most recent).
// If validation fails, then the Chain Validation Status is "fail", and the algorithm stops here. // If validation fails, then the Chain Validation Status is "fail", and the algorithm stops here.