|
137 | 137 | #endif /* _FFR_REPUTATION */
|
138 | 138 |
|
139 | 139 | /* macros */
|
140 |
| -#define CMDLINEOPTS "Ab:c:d:De:fF:k:lL:no:p:P:Qrs:S:t:T:u:vVWx:X?" |
| 140 | +#define CMDLINEOPTS "Ab:c:d:De:fF:gk:lL:no:p:P:Qrs:S:t:T:u:vVWx:X?" |
141 | 141 |
|
142 | 142 | #ifndef MIN
|
143 | 143 | # define MIN(x,y) ((x) < (y) ? (x) : (y))
|
@@ -248,6 +248,7 @@ struct dkimf_config
|
248 | 248 | _Bool conf_noheaderb; /* suppress "header.b" */
|
249 | 249 | _Bool conf_singleauthres; /* single Auth-Results */
|
250 | 250 | _Bool conf_safekeys; /* check key permissions */
|
| 251 | + _Bool conf_checksigningtable; /* skip checking keys on startup */ |
251 | 252 | #ifdef _FFR_RESIGN
|
252 | 253 | _Bool conf_resignall; /* resign unverified mail */
|
253 | 254 | #endif /* _FFR_RESIGN */
|
@@ -5892,6 +5893,7 @@ dkimf_config_new(void)
|
5892 | 5893 | new->conf_atpshash = dkimf_atpshash[0].str;
|
5893 | 5894 | #endif /* _FFR_ATPS */
|
5894 | 5895 | new->conf_selectcanonhdr = SELECTCANONHDR;
|
| 5896 | + new->conf_checksigningtable = TRUE; |
5895 | 5897 |
|
5896 | 5898 | memcpy(&new->conf_handling, &defaults, sizeof new->conf_handling);
|
5897 | 5899 |
|
@@ -6209,6 +6211,10 @@ dkimf_config_load(struct config *data, struct dkimf_config *conf,
|
6209 | 6211 | sizeof conf->conf_softstart);
|
6210 | 6212 | #endif /* (USE_LDAP || USE_ODBX) */
|
6211 | 6213 |
|
| 6214 | + (void) config_get(data, "CheckSigningTable", |
| 6215 | + &conf->conf_checksigningtable, |
| 6216 | + sizeof conf->conf_checksigningtable); |
| 6217 | + |
6212 | 6218 | (void) config_get(data, "DNSConnect",
|
6213 | 6219 | &conf->conf_dnsconnect,
|
6214 | 6220 | sizeof conf->conf_dnsconnect);
|
@@ -8333,7 +8339,7 @@ dkimf_config_load(struct config *data, struct dkimf_config *conf,
|
8333 | 8339 | ** missing KeyTable entries.
|
8334 | 8340 | */
|
8335 | 8341 |
|
8336 |
| - if (conf->conf_signtabledb != NULL) |
| 8342 | + if (conf->conf_signtabledb != NULL && conf->conf_checksigningtable != FALSE) |
8337 | 8343 | {
|
8338 | 8344 | _Bool first = TRUE;
|
8339 | 8345 | _Bool found;
|
@@ -15508,6 +15514,7 @@ usage(void)
|
15508 | 15514 | "\t-e name \textract configuration value and exit\n"
|
15509 | 15515 | "\t-f \tdon't fork-and-exit\n"
|
15510 | 15516 | "\t-F time \tfixed timestamp to use when signing (test mode only)\n"
|
| 15517 | + "\t-g \tdo not walk SigningTable when loading config\n" |
15511 | 15518 | "\t-k keyfile \tlocation of secret key file\n"
|
15512 | 15519 | "\t-l \tlog activity to system log\n"
|
15513 | 15520 | "\t-L limit \tsignature limit requirements\n"
|
@@ -15687,6 +15694,11 @@ main(int argc, char **argv)
|
15687 | 15694 | }
|
15688 | 15695 | break;
|
15689 | 15696 |
|
| 15697 | + case 'g': |
| 15698 | + curconf->conf_checksigningtable = FALSE; |
| 15699 | + break; |
| 15700 | + |
| 15701 | + |
15690 | 15702 | case 'k':
|
15691 | 15703 | if (optarg == NULL || *optarg == '\0')
|
15692 | 15704 | return usage();
|
|
0 commit comments