]> git.ipfire.org Git - thirdparty/openvpn.git/commit
crypto: create function to initialize encrypt and decrypt key
authorSteffan Karger <steffan@karger.me>
Fri, 7 Jul 2017 04:47:04 +0000 (12:47 +0800)
committerDavid Sommerseth <davids@openvpn.net>
Thu, 17 Aug 2017 15:28:04 +0000 (17:28 +0200)
commit9df6a9f66463e0b3ffe3c186b213e80942c13b52
tree67a2c2b7f8f302ad52e1c44d72c91a90933f34ef
parent78b329180bc1f1365b421907c6ad370c448db406
crypto: create function to initialize encrypt and decrypt key

Instead of always initialize the encrypt and decrypt keys separately,
implement an helper function init_key_ctx_bi() that takes care of
both of them for us.

Reduces code duplication and improves readability.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Antonio Quartulli <a@unstable.cc>
Message-Id: <20170707044704.7239-1-a@unstable.cc>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15011.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
(cherry picked from commit 974513ea64020c956b531b1cabd76fdbac6655d8)
src/openvpn/crypto.c
src/openvpn/crypto.h
src/openvpn/ssl.c