commit ebc58cb: Add ed25519 signing tests

John McKay adenosine3p at gmail.com
Mon Feb 4 14:35:08 UTC 2019


Author: John McKay
Date: 2019-01-21 01:45:16 +0000
URL: https://github.com/rspamd/rspamd/commit/ebc58cba8fed31f8dccc196da593f60b388d85f2

Add ed25519 signing tests

---
 .../131_dkim_signing/{001_simple.robot => 003_eddsa.robot}     |  2 +-
 test/functional/configs/dkim-eddsa.key                         |  1 +
 .../configs/dkim_signing/{simple.conf => eddsa.conf}           |  3 ++-
 test/functional/configs/plugins.conf                           | 10 ++++++++++
 4 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/test/functional/cases/131_dkim_signing/001_simple.robot b/test/functional/cases/131_dkim_signing/003_eddsa.robot
similarity index 99%
copy from test/functional/cases/131_dkim_signing/001_simple.robot
copy to test/functional/cases/131_dkim_signing/003_eddsa.robot
index 96bdcc997..ea2fe03be 100644
--- a/test/functional/cases/131_dkim_signing/001_simple.robot
+++ b/test/functional/cases/131_dkim_signing/003_eddsa.robot
@@ -31,7 +31,7 @@ TEST NOT SIGNED - USERNAME WRONG PUBKEY
 
 *** Keywords ***
 DKIM Signing Setup
-  ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/dkim_signing/simple.conf
+  ${PLUGIN_CONFIG} =  Get File  ${TESTDIR}/configs/dkim_signing/eddsa.conf
   Set Suite Variable  ${PLUGIN_CONFIG}
   Generic Setup  PLUGIN_CONFIG
 
diff --git a/test/functional/configs/dkim-eddsa.key b/test/functional/configs/dkim-eddsa.key
new file mode 100644
index 000000000..45282e12b
--- /dev/null
+++ b/test/functional/configs/dkim-eddsa.key
@@ -0,0 +1 @@
+m5kGxtckRfsNe5EuYTe7bvkDjSh7LXaX3aXyIMPGLR0=
diff --git a/test/functional/configs/dkim_signing/simple.conf b/test/functional/configs/dkim_signing/eddsa.conf
similarity index 51%
copy from test/functional/configs/dkim_signing/simple.conf
copy to test/functional/configs/dkim_signing/eddsa.conf
index 2302a0c4f..1a93c9e0b 100644
--- a/test/functional/configs/dkim_signing/simple.conf
+++ b/test/functional/configs/dkim_signing/eddsa.conf
@@ -1,5 +1,6 @@
 dkim_signing {
-  path = "${TESTDIR}/configs/dkim.key";
+  path = "${TESTDIR}/configs/dkim-eddsa.key";
+  selector = "eddsa";
   check_pubkey = true;
   allow_pubkey_mismatch = false;
 }
diff --git a/test/functional/configs/plugins.conf b/test/functional/configs/plugins.conf
index d7a5b009c..507f00b76 100644
--- a/test/functional/configs/plugins.conf
+++ b/test/functional/configs/plugins.conf
@@ -17,11 +17,21 @@ options = {
           type = "txt";
           replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDXtxBE5IiNRMcq2/lc2zErfdCvDFyQNBnMjbOjBQrPST2k4fdGbtpe5Iu5uS01Met+dAEf94XL8I0hwmYw+n70PP834zfJGi2egwGqrakpaWsCDPvIJZLkxJCJKQRA/zrQ622uEXdvYixVbsEGVw7U4wAGSmT5rU2eU1y63AlOlQIDAQAB"];
         },
+        {
+          name = "eddsa._domainkey.cacophony.za.org",
+          type = "txt";
+          replies = ["v=DKIM1; k=ed25519; p=+nU+aC33ICeS4zx8VUjFYCtxj0fRbHWQn2gP2hTkm9w="];
+        },
         {
           name = "dkim._domainkey.invalid.za.org",
           type = "txt";
           replies = ["v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDEEXmNGQq7PUrr9Mg4UakTFHgXBCy2DOztkrZm+0OrVWtiRzGluxBkbOWTBwuU3/Yw97yTphBMQxzWFN603/f/KPAQcF/Lc1l+6kmIBBxNXjjGuOK/3PYKZVntUdKmqcQBYfnHdzH2Tohbuyx1a7xqnv6VSChqQrZU4CwkeT3+eQIDAQAB"];
         },
+        {
+          name = "eddsa._domainkey.invalid.za.org",
+          type = "txt";
+          replies = ["v=DKIM1; k=ed25519; p=Wkkrp5DJTvknDMGWYv8vm3p3sZjiQp03LZo80RregY8="];
+        },
         {
           name = "dkim._domainkey.rspamd.com",
           type = "txt";


More information about the Commits mailing list