aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-05-10 19:32:53 +0200
committerTobias Brunner <tobias@strongswan.org>2017-05-26 11:22:28 +0200
commit4270c8fcb07f37100889695d19a3a3e876f2a1b8 (patch)
treede3d3de58d8aa2bec700b0b42f3afe49042640d3 /src/libcharon
parent7637633bb9ac497563a10d93d32e26443edd4383 (diff)
downloadstrongswan-4270c8fcb07f37100889695d19a3a3e876f2a1b8.tar.bz2
strongswan-4270c8fcb07f37100889695d19a3a3e876f2a1b8.tar.xz
stroke: Make 96-bit truncation for SHA-256 configurable
Diffstat (limited to 'src/libcharon')
-rw-r--r--src/libcharon/plugins/stroke/stroke_config.c3
-rw-r--r--src/libcharon/plugins/stroke/stroke_socket.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_config.c b/src/libcharon/plugins/stroke/stroke_config.c
index a9d073684..d47787d72 100644
--- a/src/libcharon/plugins/stroke/stroke_config.c
+++ b/src/libcharon/plugins/stroke/stroke_config.c
@@ -1074,7 +1074,8 @@ static child_cfg_t *build_child_cfg(private_stroke_config_t *this,
.options = (msg->add_conn.proxy_mode ? OPT_PROXY_MODE : 0) |
(msg->add_conn.ipcomp ? OPT_IPCOMP : 0) |
(msg->add_conn.me.hostaccess ? OPT_HOSTACCESS : 0) |
- (msg->add_conn.install_policy ? 0 : OPT_NO_POLICIES),
+ (msg->add_conn.install_policy ? 0 : OPT_NO_POLICIES) |
+ (msg->add_conn.sha256_96 ? OPT_SHA256_96 : 0),
.tfc = msg->add_conn.tfc,
.inactivity = msg->add_conn.inactivity,
.dpd_action = map_action(msg->add_conn.dpd.action),
diff --git a/src/libcharon/plugins/stroke/stroke_socket.c b/src/libcharon/plugins/stroke/stroke_socket.c
index 46de90ca6..65d345db3 100644
--- a/src/libcharon/plugins/stroke/stroke_socket.c
+++ b/src/libcharon/plugins/stroke/stroke_socket.c
@@ -216,6 +216,7 @@ static void stroke_add_conn(private_stroke_socket_t *this, stroke_msg_t *msg)
DBG_OPT(" dpdtimeout=%d", msg->add_conn.dpd.timeout);
DBG_OPT(" dpdaction=%d", msg->add_conn.dpd.action);
DBG_OPT(" closeaction=%d", msg->add_conn.close_action);
+ DBG_OPT(" sha256_96=%s", msg->add_conn.sha256_96 ? "yes" : "no");
DBG_OPT(" mediation=%s", msg->add_conn.ikeme.mediation ? "yes" : "no");
DBG_OPT(" mediated_by=%s", msg->add_conn.ikeme.mediated_by);
DBG_OPT(" me_peerid=%s", msg->add_conn.ikeme.peerid);