From ddd0871146dcd191a88e1e1b60572585e4a86fe3 Mon Sep 17 00:00:00 2001 From: M66B Date: Mon, 20 May 2024 13:33:48 +0200 Subject: [PATCH] DKIM: log times --- app/src/main/java/eu/faircode/email/MessageHelper.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 02048a522b..1ce9ca2736 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -2403,6 +2403,14 @@ public class MessageHelper { if (!TextUtils.isEmpty(note)) Log.i("DKIM note=" + note); + // https://datatracker.ietf.org/doc/html/rfc6376#section-3.5 + Integer t = Helper.parseInt(kv.get("t")); // Works until 2038 + if (t != null) + Log.i("DKIM timestamp=" + new Date(t * 1000L)); + Integer x = Helper.parseInt(kv.get("x")); + if (x != null) + Log.i("DKIM expiry=" + new Date(x * 1000L)); + String canonic = kv.get("c"); Log.i("DKIM canonicalization=" + canonic); if (canonic == null)