Two more debug classes

This commit is contained in:
M66B
2024-06-15 13:29:41 +02:00
parent c5b6be9c4b
commit 70cac8ba14
4 changed files with 11 additions and 7 deletions

View File

@@ -2660,7 +2660,7 @@ public class MessageHelper {
int keylen = modulus.bitLength();
Log.i("DKIM RSA pubkey length=" + keylen);
if (keylen < DKIM_MIN_KEY_LENGTH) {
EntityLog.log(context, EntityLog.Type.Debug3, "DKIM RSA pubkey length=" + keylen);
EntityLog.log(context, EntityLog.Type.Debug5, "DKIM RSA pubkey length=" + keylen);
throw new IllegalArgumentException("DKIM RSA pubkey length " + keylen + " < " + DKIM_MIN_KEY_LENGTH);
}
@@ -2669,7 +2669,7 @@ public class MessageHelper {
for (int prime = 3; prime <= 65537; prime += 2)
if (isPrime(prime) &&
modulus.remainder(BigInteger.valueOf(prime)).compareTo(BigInteger.ZERO) == 0) {
EntityLog.log(context, EntityLog.Type.Debug3, "DKIM RSA pubkey with small prime=" + prime);
EntityLog.log(context, EntityLog.Type.Debug5, "DKIM RSA pubkey with small prime=" + prime);
throw new IllegalArgumentException("DKIM RSA pubkey with small prime=" + prime);
}
Log.i("DKIM RSA okay");