The dktest program
dktest exercises the domainkeys library.
Interface
dktest opts
opts is a series of getopt-style options.
Both signing and verification merely print out the DK header. They do
not keep a copy of the input file. You will need to do something like this:
(./dktest -s /etc/domainkeys/dog </tmp/testmsg; cat /tmp/testmsg) | ./dktest -v
Here are the options:
- -s key: Sign. key is a path to a
file containing a PEM-format private key. The base name of the file
is used as the selector. Reads the email message on stdin. Prints
the DomainKey-Signature header.
- -v: Verify. Verifies the email on stdin. Exits with a
non-zero exit code and a message to stderr if there was a problem with
the signature. Always prints a DomainKey-Status: header to stdout.
- -c [simple|nofws]: Canonicalization. Defaults to simple.
- -t n: Test. n is a number
indicating which internal test is being performed. The meanings of
the numbers are documented in the source code.
- -b n: Buffer size. n is a
number which forces the buffer size. Only needed for testing.
- -h: include h= tag when signing.
- -r: only include unique headers in the signature generation, implies -h
- -T: Generate DomainKey-Trace: header, shows Diff header if Verifying.