]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Do not run ssl_dh check always
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 2 Nov 2017 10:00:42 +0000 (12:00 +0200)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 2 Nov 2017 11:22:20 +0000 (13:22 +0200)
Do it only when CONFIG_DUMP_FLAG_CHECK_SETTINGS is set. Fixes

"Warning: You can generate it with: dd if=ssl-parameters.dat bs=1 skip=88..."

src/config/config-request.c

index fe1f63ef3fcd97a4be315b83955f5565acb20967..d547a9719c991a786f40ccef917554610af25b7e 100644 (file)
@@ -465,7 +465,8 @@ int config_export_finish(struct config_export_context **_ctx)
                        enum setting_type stype;
                        const char *const *value = settings_parse_get_value(parser->parser, "ssl", &stype);
 
-                       if (value != NULL && strcmp(*value, "no") != 0 &&
+                       if ((ctx->flags & CONFIG_DUMP_FLAG_CHECK_SETTINGS) != 0 &&
+                           value != NULL && strcmp(*value, "no") != 0 &&
                            settings_parse_is_valid_key(parser->parser, "ssl_dh")) {
                                value = settings_parse_get_value(parser->parser,
                                        "ssl_dh", &stype);