commit 1d32119: [Test] Add a test with DKIM key with spaces in base64

Vsevolod Stakhov vsevolod at rspamd.com
Fri Apr 15 21:14:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-04-15 21:02:22 +0100
URL: https://github.com/rspamd/rspamd/commit/1d32119e301d0507050d28e232669832715a75c6

[Test] Add a test with DKIM key with spaces in base64
Issue: #4149

---
 test/rspamd_cxx_unit_dkim.hxx | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/test/rspamd_cxx_unit_dkim.hxx b/test/rspamd_cxx_unit_dkim.hxx
index 87e244b3d..29facba8a 100644
--- a/test/rspamd_cxx_unit_dkim.hxx
+++ b/test/rspamd_cxx_unit_dkim.hxx
@@ -111,6 +111,15 @@ TEST_CASE("rspamd_dkim_parse_key")
 			 "lnNaq5pWei/B8pG6teV+y3t4yay5ZGktALJjlylKHVo2USkVYQTFQ9Ji25m2jupdCd"
 			 "kn1FTuYNqh0Nzg3KPQHNVp7mlE7lfwIDAQAB ",
 			 true, "e40cc5c40ee29cb4f21d95c7f0dc9989"},
+			// Spaces within base64
+			{"p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCA"
+			 " QEA5CeQZpoPbsS8lG41UI1rxTtOSqPrfgZzhrZsk0t9dIbFTvaoql/FLuYcbdUARc"
+			 "  5zuyXsDj1eSprOgcPT9PY9RoSUsY8i/ jnD49DHXtMfXoBk0J6epNzbZqqWU+"
+			 "  TG02HwWNy/kf1h+OlAGQKJLgakivZ3nMMnUIPHkUjwvhbkaMXCI046XoqsEQ7KW"
+			 "  VKRoF3cK1cFXLo+bgO3sEJgGtvwzPodG0CqVu+gjehrjwdLnPhqyEspfI1IbL"
+			 "  lnNaq5pWei/B8pG6teV+y3t4yay5ZGktALJjlylKHVo2USkVYQTFQ9Ji25m2jupdCd"
+			 " kn1FTuYNqh0Nzg3KPQHNVp7mlE7lfwIDAQAB",
+					true, "e40cc5c40ee29cb4f21d95c7f0dc9989"},
 			 // Invalid RSA
 			{"ololo=trololo; k=rsa; t=s; "
 			 "p =   BADMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCA"


More information about the Commits mailing list