mirror of
https://github.com/M66B/FairEmail.git
synced 2025-03-01 01:06:11 +00:00
DKIM: check for revoked key
This commit is contained in:
parent
35d5324c1b
commit
0a4c7ae54f
1 changed files with 8 additions and 0 deletions
|
@ -2400,6 +2400,10 @@ public class MessageHelper {
|
|||
// v=DKIM1; k=rsa; p=...
|
||||
// v=DKIM1; k=ed25519; p=...
|
||||
|
||||
String note = dk.get("n");
|
||||
if (!TextUtils.isEmpty(note))
|
||||
Log.i("DKIM note=" + note);
|
||||
|
||||
String canonic = kv.get("c");
|
||||
Log.i("DKIM canonicalization=" + canonic);
|
||||
if (canonic == null)
|
||||
|
@ -2522,6 +2526,10 @@ public class MessageHelper {
|
|||
String pubkey = dk.get("p");
|
||||
if (pubkey == null)
|
||||
return null;
|
||||
if ("".equals(pubkey)) {
|
||||
Log.i("DKIM key revoked");
|
||||
return null;
|
||||
}
|
||||
|
||||
String p = pubkey.replaceAll("\\s+", "");
|
||||
Log.i("DKIM pubkey=" + p);
|
||||
|
|
Loading…
Reference in a new issue