Refactor crypto RNG; add getrandom() support
authorKirill Isakov <bootctl@gmail.com>
Tue, 12 Apr 2022 16:20:58 +0000 (22:20 +0600)
committerGuus Sliepen <guus@tinc-vpn.org>
Tue, 12 Apr 2022 17:42:11 +0000 (19:42 +0200)
commit0fe69908838248c28624beb540257892db6bdcbd
treec30aad3477fa54172da66481587ccf222fed9a49
parent56621be326497d56db0c4c372ae3cc497018cfcf
Refactor crypto RNG; add getrandom() support

/dev/urandom and /dev/random are ubiquitous, but take an open
file descriptor, and may not actually be present inside badly
configured containers.
30 files changed:
src/control.c
src/crypto.c [moved from src/gcrypt/crypto.c with 81% similarity]
src/crypto.h
src/ed25519/ecdh.c
src/ed25519/ecdsagen.c
src/gcrypt/meson.build
src/have.h
src/invitation.c
src/linux/meson.build
src/meson.build
src/net_packet.c
src/nolegacy/crypto.c [deleted file]
src/nolegacy/meson.build
src/openssl/crypto.c
src/protocol_auth.c
src/protocol_key.c
src/random.c [new file with mode: 0644]
src/random.h [new file with mode: 0644]
src/sptps.c
src/sptps_keypair.c
src/sptps_speed.c
src/sptps_test.c
src/tincctl.c
src/tincd.c
src/windows/meson.build
src/windows/random.c [new file with mode: 0644]
src/xoshiro.c
test/unit/meson.build
test/unit/test_random.c [new file with mode: 0644]
test/unit/test_random_noinit.c [new file with mode: 0644]