Skip to content

Commit 81f138a

Browse files
Remove remaining support for Trusty and Fuchsia operating systems (aws#2136)
These operating systems are unused, untested, and not a priority for us. Remove remnants of them
1 parent 1b13cd1 commit 81f138a

File tree

12 files changed

+6
-174
lines changed

12 files changed

+6
-174
lines changed

crypto/CMakeLists.txt

-2
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,7 @@ add_library(
474474
rand_extra/deterministic.c
475475
rand_extra/entropy_passive.c
476476
rand_extra/forkunsafe.c
477-
rand_extra/fuchsia.c
478477
rand_extra/rand_extra.c
479-
rand_extra/trusty.c
480478
rand_extra/windows.c
481479
rc4/rc4.c
482480
refcount_c11.c

crypto/fipsmodule/bcm.c

-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
#include "cpucap/cpu_aarch64_sysreg.c"
7777
#include "cpucap/cpu_aarch64_apple.c"
7878
#include "cpucap/cpu_aarch64_freebsd.c"
79-
#include "cpucap/cpu_aarch64_fuchsia.c"
8079
#include "cpucap/cpu_aarch64_linux.c"
8180
#include "cpucap/cpu_aarch64_openbsd.c"
8281
#include "cpucap/cpu_aarch64_win.c"

crypto/fipsmodule/cpucap/cpu_aarch64_fuchsia.c

-57
This file was deleted.

crypto/fipsmodule/rand/fork_detect.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void CRYPTO_fork_detect_ignore_madv_wipeonfork_for_testing(void) {
155155
*g_ignore_madv_wipeonfork_bss_get() = 1;
156156
}
157157

158-
#elif defined(OPENSSL_WINDOWS) || defined(OPENSSL_TRUSTY)
158+
#elif defined(OPENSSL_WINDOWS)
159159

160160
// These platforms are guaranteed not to fork, and therefore do not require
161161
// fork detection support. Returning a constant non zero value makes BoringSSL

crypto/fipsmodule/rand/internal.h

-4
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ extern "C" {
2828

2929
#if defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE)
3030
#define OPENSSL_RAND_DETERMINISTIC
31-
#elif defined(OPENSSL_FUCHSIA)
32-
#define OPENSSL_RAND_FUCHSIA
33-
#elif defined(OPENSSL_TRUSTY)
34-
#define OPENSSL_RAND_TRUSTY
3531
#elif defined(OPENSSL_WINDOWS)
3632
#define OPENSSL_RAND_WINDOWS
3733
#else

crypto/rand_extra/fuchsia.c

-38
This file was deleted.

crypto/rand_extra/getentropy_test.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#include <errno.h>
2828

29-
#if defined(OPENSSL_MACOS) || defined(OPENSSL_FUCHSIA)
29+
#if defined(OPENSSL_MACOS)
3030
#include <sys/random.h>
3131
#endif
3232

crypto/rand_extra/rand_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ TEST(RandTest, NotObviouslyBroken) {
6565
}
6666

6767
#if !defined(OPENSSL_WINDOWS) && !defined(OPENSSL_IOS) && \
68-
!defined(OPENSSL_FUCHSIA) && !defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE)
68+
!defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE)
6969
static bool ForkAndRand(bssl::Span<uint8_t> out, bool fork_unsafe_buffering) {
7070
int pipefds[2];
7171
if (pipe(pipefds) < 0) {
@@ -174,7 +174,7 @@ TEST(RandTest, Fork) {
174174
}
175175
}
176176
#endif // !OPENSSL_WINDOWS && !OPENSSL_IOS &&
177-
// !OPENSSL_FUCHSIA && !BORINGSSL_UNSAFE_DETERMINISTIC_MODE
177+
// !BORINGSSL_UNSAFE_DETERMINISTIC_MODE
178178

179179
#if defined(OPENSSL_THREADS)
180180
static void RunConcurrentRands(size_t num_threads) {

crypto/rand_extra/trusty.c

-38
This file was deleted.

crypto/x509/x509_def.c

-4
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,7 @@
5858

5959
// TODO(fork): cleanup
6060

61-
#if defined(OPENSSL_FUCHSIA)
62-
#define OPENSSLDIR "/config/ssl"
63-
#else
6461
#define OPENSSLDIR "/etc/ssl"
65-
#endif
6662

6763
#define X509_CERT_AREA OPENSSLDIR
6864
#define X509_CERT_DIR OPENSSLDIR "/certs"

include/openssl/target.h

+2-20
Original file line numberDiff line numberDiff line change
@@ -86,40 +86,22 @@
8686
#define OPENSSL_WINDOWS
8787
#endif
8888

89-
// Trusty and Android baremetal aren't Linux but currently define __linux__.
89+
// Android baremetal aren't Linux but currently define __linux__.
9090
// As a workaround, we exclude them here.
9191
// We also exclude nanolibc/CrOS EC/Zephyr. nanolibc/CrOS EC/Zephyr
9292
// sometimes build for a non-Linux target (which should not define __linux__),
9393
// but also sometimes build for Linux. Although technically running in Linux
9494
// userspace, this lacks all the libc APIs we'd normally expect on Linux, so we
9595
// treat it as a non-Linux target.
9696
//
97-
// TODO(b/169780122): Remove this workaround once Trusty no longer defines it.
9897
// TODO(b/291101350): Remove this workaround once Android baremetal no longer
9998
// defines it.
100-
#if defined(__linux__) && !defined(__TRUSTY__) && \
99+
#if defined(__linux__) && \
101100
!defined(ANDROID_BAREMETAL) && !defined(OPENSSL_NANOLIBC) && \
102101
!defined(CROS_EC) && !defined(CROS_ZEPHYR)
103102
#define OPENSSL_LINUX
104103
#endif
105104

106-
#if defined(__Fuchsia__)
107-
#define OPENSSL_FUCHSIA
108-
#endif
109-
110-
// Trusty is Android's TEE target. See
111-
// https://source.android.com/docs/security/features/trusty
112-
//
113-
// Defining this on any other platform is not supported. Other embedded
114-
// platforms must introduce their own defines.
115-
#if defined(__TRUSTY__)
116-
#define OPENSSL_TRUSTY
117-
#define OPENSSL_NO_FILESYSTEM
118-
#define OPENSSL_NO_POSIX_IO
119-
#define OPENSSL_NO_SOCK
120-
#define OPENSSL_NO_THREADS_CORRUPT_MEMORY_AND_LEAK_SECRETS_IF_THREADED
121-
#endif
122-
123105
// nanolibc is a particular minimal libc implementation. Defining this on any
124106
// other platform is not supported. Other embedded platforms must introduce
125107
// their own defines.

util/fipstools/acvp/modulewrapper/modulewrapper.cc

-6
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,7 @@
6565
namespace bssl {
6666
namespace acvp {
6767

68-
#if defined(OPENSSL_TRUSTY)
69-
#include <trusty_log.h>
70-
#define LOG_ERROR(...) TLOGE(__VA_ARGS__)
71-
#define TLOG_TAG "modulewrapper"
72-
#else
7368
#define LOG_ERROR(...) fprintf(stderr, __VA_ARGS__)
74-
#endif // OPENSSL_TRUSTY
7569

7670
#define AES_GCM_NONCE_LENGTH 12
7771

0 commit comments

Comments
 (0)