From 1b1bce16b15cbe3bc7394f7876cb064ef5b8e7ab Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Thu, 17 Jul 2014 23:58:46 -0500 Subject: update to newly-refactored arc4random compatibility shims the thread-private bits can move next ok beck@ --- .gitignore | 1 + crypto/Makefile.am.tpl | 5 +++++ crypto/compat/arc4random.h | 16 ++++++++++++++++ update.sh | 1 + 4 files changed, 23 insertions(+) create mode 100644 crypto/compat/arc4random.h diff --git a/.gitignore b/.gitignore index e413341..93f185f 100644 --- a/.gitignore +++ b/.gitignore @@ -110,6 +110,7 @@ crypto/compat/strlcpy.c crypto/compat/strtonum.c crypto/compat/timingsafe_bcmp.c crypto/compat/timingsafe_memcmp.c +crypto/compat/arc4random_*.h crypto/aes/ crypto/asn1/ diff --git a/crypto/Makefile.am.tpl b/crypto/Makefile.am.tpl index d79a270..ac87a77 100644 --- a/crypto/Makefile.am.tpl +++ b/crypto/Makefile.am.tpl @@ -69,6 +69,11 @@ endif noinst_HEADERS = des/ncbc_enc.c noinst_HEADERS += compat/thread_private.h +noinst_HEADERS += compat/arc4random.h +noinst_HEADERS += compat/arc4random_linux.h +noinst_HEADERS += compat/arc4random_osx.h +noinst_HEADERS += compat/arc4random_solaris.h +noinst_HEADERS += compat/arc4random_win.h noinst_HEADERS += compat/chacha_private.h libcrypto_la_SOURCES = EXTRA_libcrypto_la_SOURCES = diff --git a/crypto/compat/arc4random.h b/crypto/compat/arc4random.h new file mode 100644 index 0000000..e4ecd06 --- /dev/null +++ b/crypto/compat/arc4random.h @@ -0,0 +1,16 @@ +#ifdef __linux__ +#include "arc4random_linux.h" +#endif + +#ifdef __APPLE__ +#include "arc4random_osx.h" +#endif + +#ifdef __sun +#include "arc4random_solaris.h" +#endif + +#ifdef __WIN32 +#include "arc4random_win.h" +#endif + diff --git a/update.sh b/update.sh index 1b30f7d..b226603 100755 --- a/update.sh +++ b/update.sh @@ -68,6 +68,7 @@ cp $libc_src/stdlib/reallocarray.c crypto/compat cp $libc_src/crypt/arc4random.c crypto/compat cp $libc_src/crypt/chacha_private.h crypto/compat cp $libcrypto_src/crypto/getentropy_*.c crypto/compat +cp $libcrypto_src/crypto/arc4random_*.h crypto/compat (cd ./$libssl_src/src/crypto/objects/; perl objects.pl objects.txt obj_mac.num obj_mac.h; -- cgit v1.2.3-55-g6feb