#include <libcitadel.h>
+// This utility function is used by the body canonicalizer
char *dkim_rtrim(char *str) {
char *end;
int len = strlen(str);
}
+// This utility function is used by the body canonicalizer
char *dkim_rtrim_lines(char *str) {
char *end;
int len = strlen(str);
EVP_MD_CTX_free(mdctx);
// This is an optional routine to verify our own signature.
- // The test program in tests/dkimtester enables it. It is not enabled during server operation.
+ // The test program in tests/dkimtester enables it. It is not enabled in Citadel Server.
#ifdef DKIM_VERIFY_SIGNATURE
mdctx = EVP_MD_CTX_new();
if (mdctx) {
# dkimtester
-This is a test harness for Citadel's DKIM signing code. As this is
-being written, the public DNS for dev.citadel.org has a DKIM record
-that matches the private key in this test program. This is not
-guaranteed to continue and if you want to run this test you might need
-to set things up for yourself.
+This is a test harness for Citadel's DKIM signing code. It is not likely
+that you will use this program unless you're hacking on the DKIM signer
+itself. The private key embedded in the test program matches the DKIM record
+for `dev.citadel.org` at the time this is being written. That record looks
+like this:
-To run this test, you must have the `Mail::DKIM::Verifier` perl module
+```
+foo._domainkey.dev.citadel.org IN TXT "v=DKIM1;k=rsa;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA37nn3HqaJEa56Ukg7MbvkA6ng/Bi/UJ2c/zeiMU3Qb+lnNdBMQXtiI0uXSiOwL4UkhCtMxhPB5KZsHnHG4nqUKnrnrXlswDGdbk+N2w95O3snu71qG4jj/ULaGBkerBtuYdluU23PdVuH3b2J8WFSY8fMCFRdH96Nub/q0LnqKNB5bxsgPf8YvRgGiS9OTpitcZzCYEr1v0PEM6u2qX9Q+lz1x7ob+bXrxJZGeY5bzNsNHE1cgMzK1IekZHJ/cTOPzT1mIIQXN4zuE6z50q6G0Bq19H3IsxPxTeiNIp9CnvGfoDDPDXhXLI7y2XvTKWPYtKcP8oCyIebdzuKqcAtSQIDAQAB"
+```
+If you intend to work with this program, that key will be long gone by the
+time you read this, and *you* don't control `dev.citadel.org` anyway, so you
+will have to create your own host name and set your own DKIM record. You can
+use this private key if you want to, though.
+
+To run this test, you also must have the `Mail::DKIM::Verifier` perl module
installed, which can be found on CPAN.
+Again -- this is not intended to be part of a regression test suite.