]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Move file-related functions from misc.c to platform.c
authorSteffan Karger <steffan.karger@fox-it.com>
Wed, 4 Jul 2018 17:53:56 +0000 (19:53 +0200)
committerGert Doering <gert@greenie.muc.de>
Thu, 5 Jul 2018 20:31:21 +0000 (22:31 +0200)
commitb7bea782f3356dbd82613dc8f38fd4ef0bc714ca
tree39b3cebe888aac828b4673e09260351c78271ff2
parente050bdfe9489ae9d0a15cb000360b73c7c748b59
Move file-related functions from misc.c to platform.c

To avoid having to include misc.c - which is a dependency mess - in the
tls-crypt unit tests, move file-handing related functions to platform.c
(which is where other file-related functions already reside).

Note that platform_create_temp_file() needs random.  To avoid including
misc.c in other tests that use platform.c, add a mock get_random().

(Almost every test includes platform.c, because buffer.c depends on it.
That smells like it needs cleanup too, but not in this patch set.)

Signed-off-by: Steffan Karger <steffan.karger@fox-it.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <20180704175404.22371-1-steffan@karger.me>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg17208.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/init.c
src/openvpn/misc.c
src/openvpn/misc.h
src/openvpn/multi.c
src/openvpn/pf.c
src/openvpn/platform.c
src/openvpn/platform.h
src/openvpn/plugin.c
src/openvpn/ssl_verify.c
tests/unit_tests/openvpn/Makefile.am
tests/unit_tests/openvpn/mock_get_random.c [new file with mode: 0644]