Issue #1671: Only generate SecHashKey when SecHashEngine is On

This commit is contained in:
Daniel Muey 2018-02-28 12:34:32 -06:00 committed by Victor Hora
parent b9bf98f2c1
commit a677456078
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,8 @@
DD MMM YYYY - 2.9.3 - To be released
------------------------------------
* Only generate SecHashKey when SecHashEngine is On
[Issue #1671 - @dmuey, @monkburger, @zimmerle]
* Docs: Reformat README to Markdown and update dependencies
[Issue #1857 - @hsluoyz, @victorhora]
* IIS: no lock on ProcessRequest. No reload of config.

View File

@ -732,8 +732,13 @@ void init_directory_config(directory_config *dcfg)
if (dcfg->col_timeout == NOT_SET) dcfg->col_timeout = 3600;
/* Hash */
if (dcfg->crypto_key == NOT_SET_P) dcfg->crypto_key = getkey(dcfg->mp);
if (dcfg->crypto_key_len == NOT_SET) dcfg->crypto_key_len = strlen(dcfg->crypto_key);
if (dcfg->hash_is_enabled == HASH_ENABLED) {
if (dcfg->crypto_key == NOT_SET_P) dcfg->crypto_key = getkey(dcfg->mp);
if (dcfg->crypto_key_len == NOT_SET) dcfg->crypto_key_len = strlen(dcfg->crypto_key);
} else {
if (dcfg->crypto_key == NOT_SET_P) dcfg->crypto_key = "";
if (dcfg->crypto_key_len == NOT_SET) dcfg->crypto_key_len = 0;
}
if (dcfg->crypto_key_add == NOT_SET) dcfg->crypto_key_add = HASH_KEYONLY;
if (dcfg->crypto_param_name == NOT_SET_P) dcfg->crypto_param_name = "crypt";
if (dcfg->hash_is_enabled == NOT_SET) dcfg->hash_is_enabled = HASH_DISABLED;