diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-05-10 19:37:22 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-05-26 11:22:28 +0200 |
commit | 0afe0eca67d696a4842462dea949739ba0554a8b (patch) | |
tree | 8ba3d05f025225e21f2d156d60c1abacc766b74f /src/libcharon/plugins/vici/vici_config.c | |
parent | 4270c8fcb07f37100889695d19a3a3e876f2a1b8 (diff) | |
download | strongswan-0afe0eca67d696a4842462dea949739ba0554a8b.tar.bz2 strongswan-0afe0eca67d696a4842462dea949739ba0554a8b.tar.xz |
vici: Make 96-bit truncation for SHA-256 configurable
Diffstat (limited to 'src/libcharon/plugins/vici/vici_config.c')
-rw-r--r-- | src/libcharon/plugins/vici/vici_config.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/libcharon/plugins/vici/vici_config.c b/src/libcharon/plugins/vici/vici_config.c index 46eaf5cff..3af67df94 100644 --- a/src/libcharon/plugins/vici/vici_config.c +++ b/src/libcharon/plugins/vici/vici_config.c @@ -525,6 +525,7 @@ static void log_child_data(child_data_t *data, char *name) DBG2(DBG_CFG, " local_ts = %#R", data->local_ts); DBG2(DBG_CFG, " remote_ts = %#R", data->remote_ts); DBG2(DBG_CFG, " hw_offload = %u", cfg->options & OPT_HW_OFFLOAD); + DBG2(DBG_CFG, " sha256_96 = %u", cfg->options & OPT_SHA256_96); } /** @@ -892,6 +893,15 @@ CALLBACK(parse_opt_hw_offl, bool, } /** + * Parse OPT_SHA256_96 option + */ +CALLBACK(parse_opt_sha256_96, bool, + child_cfg_option_t *out, chunk_t v) +{ + return parse_option(out, OPT_SHA256_96, v); +} + +/** * Parse an action_t */ CALLBACK(parse_action, bool, @@ -1550,6 +1560,7 @@ CALLBACK(child_kv, bool, { "priority", parse_uint32, &child->cfg.priority }, { "interface", parse_string, &child->cfg.interface }, { "hw_offload", parse_opt_hw_offl, &child->cfg.options }, + { "sha256_96", parse_opt_sha256_96,&child->cfg.options }, }; return parse_rules(rules, countof(rules), name, value, |