diff --git a/BUILD.generated.bzl b/BUILD.generated.bzl index 60384ec7b..142ea3e20 100644 --- a/BUILD.generated.bzl +++ b/BUILD.generated.bzl @@ -413,7 +413,6 @@ crypto_sources = [ "src/crypto/pool/pool.c", "src/crypto/rand_extra/deterministic.c", "src/crypto/rand_extra/forkunsafe.c", - "src/crypto/rand_extra/fuchsia.c", "src/crypto/rand_extra/getentropy.c", "src/crypto/rand_extra/ios.c", "src/crypto/rand_extra/passive.c", diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c5ada109..f59072953 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -405,7 +405,6 @@ add_library( src/crypto/pool/pool.c src/crypto/rand_extra/deterministic.c src/crypto/rand_extra/forkunsafe.c - src/crypto/rand_extra/fuchsia.c src/crypto/rand_extra/getentropy.c src/crypto/rand_extra/ios.c src/crypto/rand_extra/passive.c diff --git a/sources.json b/sources.json index 9d54b0c94..9f61e3ae6 100644 --- a/sources.json +++ b/sources.json @@ -139,7 +139,6 @@ "src/crypto/pool/pool.c", "src/crypto/rand_extra/deterministic.c", "src/crypto/rand_extra/forkunsafe.c", - "src/crypto/rand_extra/fuchsia.c", "src/crypto/rand_extra/getentropy.c", "src/crypto/rand_extra/ios.c", "src/crypto/rand_extra/passive.c", diff --git a/src/crypto/CMakeLists.txt b/src/crypto/CMakeLists.txt index 7c944c1aa..e004f19b5 100644 --- a/src/crypto/CMakeLists.txt +++ b/src/crypto/CMakeLists.txt @@ -199,7 +199,6 @@ add_library( pool/pool.c rand_extra/deterministic.c rand_extra/forkunsafe.c - rand_extra/fuchsia.c rand_extra/getentropy.c rand_extra/ios.c rand_extra/passive.c diff --git a/src/crypto/fipsmodule/rand/internal.h b/src/crypto/fipsmodule/rand/internal.h index 163672203..595013dd0 100644 --- a/src/crypto/fipsmodule/rand/internal.h +++ b/src/crypto/fipsmodule/rand/internal.h @@ -28,8 +28,6 @@ extern "C" { #if defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) #define OPENSSL_RAND_DETERMINISTIC -#elif defined(OPENSSL_FUCHSIA) -#define OPENSSL_RAND_FUCHSIA #elif defined(OPENSSL_TRUSTY) // Trusty's PRNG file is, for now, maintained outside the tree. #elif defined(OPENSSL_WINDOWS) diff --git a/src/crypto/rand_extra/fuchsia.c b/src/crypto/rand_extra/fuchsia.c deleted file mode 100644 index d4fb9797a..000000000 --- a/src/crypto/rand_extra/fuchsia.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (c) 2017, Google Inc. - * - * Permission to use, copy, modify, and/or distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY - * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ - -#include - -#include "../fipsmodule/rand/internal.h" - -#if defined(OPENSSL_RAND_FUCHSIA) - -#include -#include - -#include - -void CRYPTO_sysrand(uint8_t *out, size_t requested) { - zx_cprng_draw(out, requested); -} - -void CRYPTO_sysrand_for_seed(uint8_t *out, size_t requested) { - CRYPTO_sysrand(out, requested); -} - -#endif // OPENSSL_RAND_FUCHSIA diff --git a/src/crypto/rand_extra/getentropy.c b/src/crypto/rand_extra/getentropy.c index fddf0beed..d4b5e68e3 100644 --- a/src/crypto/rand_extra/getentropy.c +++ b/src/crypto/rand_extra/getentropy.c @@ -22,7 +22,7 @@ #include #include -#if defined(OPENSSL_MACOS) +#if defined(OPENSSL_MACOS) || defined(OPENSSL_FUCHSIA) #include #endif