mirror of
https://github.com/rspamd/rspamd.git
synced 2024-09-13 15:45:47 +02:00
[Test] Add ed25519 tests
This commit is contained in:
parent
4ac5ff0349
commit
15a5ad7fa3
@ -22,3 +22,11 @@ DKIM Self Verify
|
||||
Run Keyword If ${RAN_SIGNTEST} == 0 Fail "Sign test was not run"
|
||||
${result} = Scan Message With Rspamc ${SIGNED_MESSAGE}
|
||||
Check Rspamc ${result} R_DKIM_ALLOW
|
||||
|
||||
DKIM Verify ED25519 PASS
|
||||
${result} = Scan Message With Rspamc ${TESTDIR}/messages/ed25519.eml
|
||||
Check Rspamc ${result} R_DKIM_ALLOW
|
||||
|
||||
DKIM Verify ED25519 REJECT
|
||||
${result} = Scan Message With Rspamc ${TESTDIR}/messages/ed25519-broken.eml
|
||||
Check Rspamc ${result} R_DKIM_REJECT
|
@ -1,33 +1,38 @@
|
||||
options = {
|
||||
filters = ["dkim"]
|
||||
pidfile = "${TMPDIR}/rspamd.pid"
|
||||
dns {
|
||||
retransmits = 10;
|
||||
timeout = 2s;
|
||||
}
|
||||
filters = ["dkim"]
|
||||
pidfile = "${TMPDIR}/rspamd.pid"
|
||||
dns {
|
||||
retransmits = 10;
|
||||
timeout = 2s;
|
||||
fake_records = [{ # ed25519
|
||||
name = "test._domainkey.example.com";
|
||||
type = txt;
|
||||
replies = ["k=ed25519; p=yi50DjK5O9pqbFpNHklsv9lqaS0ArSYu02qp1S0DW1Y="];
|
||||
}];
|
||||
}
|
||||
}
|
||||
logging = {
|
||||
type = "file",
|
||||
level = "debug"
|
||||
filename = "${TMPDIR}/rspamd.log"
|
||||
type = "file",
|
||||
level = "debug"
|
||||
filename = "${TMPDIR}/rspamd.log"
|
||||
}
|
||||
metric = {
|
||||
name = "default",
|
||||
actions = {
|
||||
reject = 100500,
|
||||
}
|
||||
unknown_weight = 1
|
||||
name = "default",
|
||||
actions = {
|
||||
reject = 100500,
|
||||
}
|
||||
unknown_weight = 1
|
||||
}
|
||||
|
||||
worker {
|
||||
type = normal
|
||||
bind_socket = ${LOCAL_ADDR}:${PORT_NORMAL}
|
||||
count = 1
|
||||
keypair {
|
||||
pubkey = "${KEY_PUB1}";
|
||||
privkey = "${KEY_PVT1}";
|
||||
}
|
||||
task_timeout = 60s;
|
||||
type = normal
|
||||
bind_socket = ${LOCAL_ADDR}:${PORT_NORMAL}
|
||||
count = 1
|
||||
keypair {
|
||||
pubkey = "${KEY_PUB1}";
|
||||
privkey = "${KEY_PVT1}";
|
||||
}
|
||||
task_timeout = 60s;
|
||||
}
|
||||
|
||||
worker {
|
||||
|
14
test/functional/messages/ed25519-broken.eml
Normal file
14
test/functional/messages/ed25519-broken.eml
Normal file
@ -0,0 +1,14 @@
|
||||
DKIM-Signature: v=1; a=ed25519; c=relaxed/simple; d=example.com;
|
||||
i=@example.com; q=dns/txt; s=test; t=5; h=message-id :
|
||||
date : from : to : subject : date : from : subject;
|
||||
bh=wE7NXSkgnx9PGiavN4OZhJztvkqPDlemV3OGuEnLwNo=;
|
||||
b=wt7P+9DoBwcln1RKE3LN7069ZEEiSyVE/NH1YXnqnJy4JcrSCZUbeIEh
|
||||
vXssPHelX4yNSXG9eTGTwwk5NxYqBw==
|
||||
Received: from localhost
|
||||
Message-ID: <example@example.com>
|
||||
Date: Mon, 02 Jan 2011 01:02:03 +0400
|
||||
From: Test User <test@example.com>
|
||||
To: somebody@example.com
|
||||
Subject: Testing
|
||||
|
||||
This is a test message.
|
14
test/functional/messages/ed25519.eml
Normal file
14
test/functional/messages/ed25519.eml
Normal file
@ -0,0 +1,14 @@
|
||||
DKIM-Signature: v=1; a=ed25519; c=relaxed/simple; d=example.com;
|
||||
i=@example.com; q=dns/txt; s=test; t=5; h=message-id :
|
||||
date : from : to : subject : date : from : subject;
|
||||
bh=wE7NXSkgnx9PGiavN4OZhJztvkqPDlemV3OGuEnLwNo=;
|
||||
b=wt7P+9DoBwcln1RKE3LN7069ZEEiSyVE/NH1YXnqnJy4JcrSCZUbeIEh
|
||||
vXssPHelX4yNSXG9eTGTwwk5NxYqBw==
|
||||
Received: from localhost
|
||||
Message-ID: <example@example.com>
|
||||
Date: Mon, 01 Jan 2011 01:02:03 +0400
|
||||
From: Test User <test@example.com>
|
||||
To: somebody@example.com
|
||||
Subject: Testing
|
||||
|
||||
This is a test message.
|
Loading…
Reference in New Issue
Block a user