]> code.citadel.org Git - citadel.git/commitdiff
minor comments and stuff
authorArt Cancro <ajc@citadel.org>
Tue, 14 May 2024 02:53:04 +0000 (02:53 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 14 May 2024 02:53:04 +0000 (02:53 +0000)
citadel/server/modules/smtp/dkim.c
citadel/tests/dkimtester/README.md

index cb4f881795e96ee26398086cee448731c5765640..639c5086d9901be425450ab576f16fe3d9d11a11 100644 (file)
@@ -31,6 +31,7 @@
 #include <libcitadel.h>
 
 
+// This utility function is used by the body canonicalizer
 char *dkim_rtrim(char *str) {
        char *end;
        int len = strlen(str);
@@ -85,6 +86,7 @@ void dkim_wrap_header_strbuf(StrBuf *header_in) {
 }
 
 
+// This utility function is used by the body canonicalizer
 char *dkim_rtrim_lines(char *str) {
        char *end;
        int len = strlen(str);
@@ -503,7 +505,7 @@ void dkim_sign(StrBuf *email, char *pkey_in, char *domain, char *selector) {
        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) {
index 54c93c24e97c2b6686cfdd2a411e5af30f6d6560..5a9d9e8912c33315bab25b24b546cdcf0e7b6ef6 100644 (file)
@@ -1,11 +1,20 @@
 # 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.