Implemented signing both RSA and Ed25519, updated TODO. Required creation of SelectorEd25519 option.
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
TODO
|
||||
|
||||
0.9.1 (Alpha)
|
||||
Sign rsa/ed25519
|
||||
Sign rsa/ed25519 implemented
|
||||
Verify rsa/ed25519 implemented
|
||||
Domain implemented
|
||||
KeyFile implemented
|
||||
KeyFileEd25519
|
||||
KeyFileEd25519 implemented
|
||||
Mode implemented
|
||||
PidFile implemented verified
|
||||
Selector implemented
|
||||
@@ -51,6 +51,7 @@ FixCRLF
|
||||
KeepAuthResults
|
||||
KeepTemporaryFiles
|
||||
KeyTable
|
||||
KeytableEd25519
|
||||
LogResults
|
||||
LogWhy
|
||||
MaximumHeaders
|
||||
|
||||
+15
-1
@@ -310,7 +310,7 @@ containing the process ID.
|
||||
|
||||
.TP
|
||||
.I Selector (string)
|
||||
Defines the name of the selector to be used when signing messages.
|
||||
Defines the name of the selector to be used when signing messages using RSA.
|
||||
See the
|
||||
.B DKIM
|
||||
specification for details. Used only when signing with a single key;
|
||||
@@ -322,6 +322,20 @@ This parameter is ignored if a
|
||||
.I KeyTable
|
||||
is defined. [KeyTable NOT IMPLEMENTED]
|
||||
|
||||
.TP
|
||||
.I SelectorEd25519 (string)
|
||||
Defines the name of the selector to be used when signing messages using Ed25519.
|
||||
See the
|
||||
.B DKIM
|
||||
specification for details. Used only when signing with a single key;
|
||||
see the
|
||||
.I SigningTable
|
||||
parameter below for more information.
|
||||
|
||||
This parameter is ignored if a
|
||||
.I KeyTableEd25519
|
||||
is defined. [KeyTable NOT IMPLEMENTED]
|
||||
|
||||
.TP
|
||||
.I Socket (string)
|
||||
Specifies the socket that should be established by the filter to receive
|
||||
|
||||
@@ -176,6 +176,12 @@ class dkimMilter(Milter.Base):
|
||||
canonicalize=('relaxed','simple'))
|
||||
name,val = h.split(': ',1)
|
||||
self.addheader(name,val.strip().replace('\r\n','\n'),0)
|
||||
if conf.get('KeyFileEd25519'):
|
||||
d = dkim.DKIM(txt)
|
||||
h = d.sign(conf.get('SelectorEd25519'),conf.get('Domain'),conf.get('KeyFileEd25519'),
|
||||
canonicalize=('relaxed','simple'))
|
||||
name,val = h.split(': ',1)
|
||||
self.addheader(name,val.strip().replace('\r\n','\n'),0)
|
||||
except dkim.DKIMException as x:
|
||||
if milterconfig.get('Syslog'):
|
||||
syslog.syslog('DKIM: %s'%x)
|
||||
|
||||
Reference in New Issue
Block a user