]> git.ipfire.org Git - thirdparty/openvpn.git/commit
generate_key_expansion: make assumption explicit, use C99 features
authorSteffan Karger <steffan@karger.me>
Tue, 22 Nov 2016 20:09:26 +0000 (21:09 +0100)
committerGert Doering <gert@greenie.muc.de>
Tue, 22 Nov 2016 21:29:43 +0000 (22:29 +0100)
commit48d41413c4b181e00769cdb83ccfe179299ad8e4
tree46f40a12c2ba9d6a1e55621410fac1a5f17a0215
parentda941141f34935f2c362b262a83de3cd722b65d6
generate_key_expansion: make assumption explicit, use C99 features

This function potentially allocates memory, and can therefor not be run
again on an initialized key_ctx_bi.  Make this explicit by adding an error
if someone tries do to this anyway.

While touching the function, cleanup it up a bit to make up for the added
lines of code.

Signed-off-by: Steffan Karger <steffan@karger.me>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1479845366-15774-1-git-send-email-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13202.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/ssl.c