aboutsummaryrefslogtreecommitdiffstats
path: root/test/functional
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-18 20:07:30 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-02-18 20:07:30 +0000
commit12a9552a9ca7490ed8c4c53a78c2e3e580076cdc (patch)
tree37381ffa1cbc0990a6757f4dfbd9af958c10fc3e /test/functional
parenteb5177cf94ee3cd9941cd820dbd8ecfe6746bae2 (diff)
downloadrspamd-12a9552a9ca7490ed8c4c53a78c2e3e580076cdc.tar.gz
rspamd-12a9552a9ca7490ed8c4c53a78c2e3e580076cdc.zip
[Test] Add test for http headers signing
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/cases/131_dkim_signing/001_simple.robot5
-rw-r--r--test/functional/configs/dkim_signing/simple.conf2
2 files changed, 7 insertions, 0 deletions
diff --git a/test/functional/cases/131_dkim_signing/001_simple.robot b/test/functional/cases/131_dkim_signing/001_simple.robot
index 96bdcc997..286fa8716 100644
--- a/test/functional/cases/131_dkim_signing/001_simple.robot
+++ b/test/functional/cases/131_dkim_signing/001_simple.robot
@@ -19,6 +19,11 @@ TEST SIGNED
Check Rspamc ${result} DKIM-Signature:
Should Contain ${result.stdout} DKIM_SIGNED
+TEST SIGNED HTTP HEADERS
+ ${result} = Scan Message With Rspamc ${MESSAGE} -u bob@example.com --header="PerformDkimSign=yes" --header="DkimDomain=example.com" --header="DkimSelector=test" --header="DkimPrivateKey=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBANe3EETkiI1Exyrb+VzbMSt90K8MXJA0GcyNs6MFCs9JPaTh90Zu2l7ki7m5LTUx6350AR/3hcvwjSHCZjD6fvQ8/zfjN8kaLZ6DAaqtqSlpawIM+8glkuTEkIkpBED/OtDrba4Rd29iLFVuwQZXDtTjAAZKZPmtTZ5TXLrcCU6VAgMBAAECgYEA1BFvmBsIN8Gu/+6kNupya2xUNVM0yLu/xT5lpNV3LBO325oejAq8+d87kkl/LTW3a2jGFlQ0ICuLw+2mo24QUWRyv8if3oeBMlnLqHE+6wNjFVqo5sOjKzjO363xSXwXNUrBT7jDhnZcDN8w3/FecYKjifGTVtUs1SLsYwhlc8ECQQDuCRymLZQ/imPn5eFVIydwUzg8ptZlvoA7bfIxUL9BQRX33s59kLCilA0tTed8Dd+GnxsT93XOj1ApIfBwmTSlAkEA5/63PDsN7fH+WInqVD8nU07M9S8LcGDlPbVVBr2S2I78/iwrSDAYtbkU2vEbhFK/JuKNML2j8OkzV3v1QulfMQJBALDzhx+l/HHr3+8RPhx7QKNIyiKUaAdEwbDsP8IXY8YPq1QThu9jM1v4sX7/TdkzuvoppwiFykbe1NlvCH279p0CQCmTg4Ee0DtBcCSr6rvYaZLLf329RZ6JLuwlMCy6ErQOxBZFEiiovfTrS2qFZToMnkc4uLbwdY36LQJTq7unGTECQCCok8LzBeZtAw+TJofpOM3F2Rlm2qXiBVBeubhRedsiljG0hpvvLJBMppnQ6r27p5Jk39SmaTRkxEKrxPWWLNM="
+ Check Rspamc ${result} DKIM-Signature:
+ Should Contain ${result.stdout} DKIM_SIGNED
+
TEST NOT SIGNED - USERNAME WRONG DOMAIN
${result} = Scan Message With Rspamc ${MESSAGE} -u bob@example.tk
Check Rspamc ${result} DKIM-Signature: inverse=1
diff --git a/test/functional/configs/dkim_signing/simple.conf b/test/functional/configs/dkim_signing/simple.conf
index 2302a0c4f..14b8d5ec6 100644
--- a/test/functional/configs/dkim_signing/simple.conf
+++ b/test/functional/configs/dkim_signing/simple.conf
@@ -2,4 +2,6 @@ dkim_signing {
path = "${TESTDIR}/configs/dkim.key";
check_pubkey = true;
allow_pubkey_mismatch = false;
+ use_http_headers = true;
+ allow_headers_fallback = true;
}