Skip to content

Commit 65a68f8

Browse files
committed
Change name of macro
1 parent 8bb2c09 commit 65a68f8

File tree

10 files changed

+17
-17
lines changed

10 files changed

+17
-17
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ option(ENABLE_DATA_INDEPENDENT_TIMING "Enable automatic setting/resetting Data-I
9595
(DIT) flag in cryptographic functions. Currently only applicable to Arm64 (except on Windows)" OFF)
9696
option(ENABLE_PRE_SONAME_BUILD "Build AWS-LC without SONAME configuration for shared library builds" ON)
9797
option(ENABLE_SOURCE_MODIFICATION "Allow the build to update files in the source directory. This is typically done to update versioning." ON)
98-
option(DISABLE_USAGE_OF_CPU_JITTER_ENTROPY "Disable usage of CPU Jitter Entropy as an entropy source. This option cannot be used with the FIPS build. With this configuration, randomness generation might not use two independent entropy sources." OFF)
98+
option(DISABLE_CPU_JITTER_ENTROPY "Disable usage of CPU Jitter Entropy as an entropy source. This option cannot be used with the FIPS build. With this configuration, randomness generation might not use two independent entropy sources." OFF)
9999

100100
include(cmake/go.cmake)
101101

@@ -116,7 +116,7 @@ if(DISABLE_USAGE_OF_CPU_JITTER_ENTROPY)
116116
if(FIPS)
117117
message(FATAL_ERROR "Cannot opt-out of CPU Jitter for the FIPS build")
118118
endif()
119-
add_definitions(-DDO_NOT_USE_CPU_JITTER_ENTROPY)
119+
add_definitions(-DDISABLE_CPU_JITTER_ENTROPY)
120120
message(STATUS "Entropy source configuration: CPU Jitter opt-out")
121121
message(STATUS "Entropy source configured: Dynamic (default: Operating system)")
122122
else()

crypto/fipsmodule/rand/cpu_jitter_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33

4-
#if !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
4+
#if !defined(DISABLE_CPU_JITTER_ENTROPY)
55

66
#include <gtest/gtest.h>
77

@@ -66,4 +66,4 @@ TEST(CPUJitterEntropyTest, Basic) {
6666
EXPECT_EQ(jitter_version, jent_version());
6767
}
6868

69-
#endif // !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
69+
#endif // !defined(DISABLE_CPU_JITTER_ENTROPY)

crypto/fipsmodule/rand/entropy/entropy_source_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ TEST(EntropySources, Configuration) {
8181

8282
// If entropy build configuration choose to explicitly opt-out of CPU Jitter
8383
// Entropy
84-
#elif defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
84+
#elif defined(DISABLE_CPU_JITTER_ENTROPY)
8585
EXPECT_EQ(OPT_OUT_CPU_JITTER_ENTROPY_SOURCE, get_entropy_source_method_id_FOR_TESTING());
8686

8787
#else

crypto/fipsmodule/rand/entropy/entropy_sources.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ static int is_snapsafe_environment(void) {
7777
}
7878

7979
static int has_explicitly_opted_out_of_cpu_jitter(void) {
80-
#if defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
80+
#if defined(DISABLE_CPU_JITTER_ENTROPY)
8181
return 1;
8282
#else
8383
return 0;

crypto/fipsmodule/rand/entropy/internal.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,20 @@ OPENSSL_EXPORT void override_entropy_source_method_FOR_TESTING(
5555

5656
OPENSSL_EXPORT int get_entropy_source_method_id_FOR_TESTING(void);
5757

58-
#if !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
58+
#if !defined(DISABLE_CPU_JITTER_ENTROPY)
5959
OPENSSL_EXPORT int tree_jitter_initialize(struct entropy_source_t *entropy_source);
6060
OPENSSL_EXPORT void tree_jitter_zeroize_thread_drbg(struct entropy_source_t *entropy_source);
6161
OPENSSL_EXPORT void tree_jitter_free_thread_drbg(struct entropy_source_t *entropy_source);
6262
OPENSSL_EXPORT int tree_jitter_get_seed(
6363
const struct entropy_source_t *entropy_source, uint8_t seed[CTR_DRBG_ENTROPY_LEN]);
64-
#else
64+
#else // !defined(DISABLE_CPU_JITTER_ENTROPY)
6565
// Define stubs for tree-DRBG functions that implements the entropy source
6666
// interface.
6767
static inline int tree_jitter_initialize(struct entropy_source_t *entropy_source) { return 0; }
6868
static inline void tree_jitter_zeroize_thread_drbg(struct entropy_source_t *entropy_source) { abort(); }
6969
static inline void tree_jitter_free_thread_drbg(struct entropy_source_t *entropy_source) { abort(); }
7070
static inline int tree_jitter_get_seed(const struct entropy_source_t *entropy_source, uint8_t seed[CTR_DRBG_ENTROPY_LEN]) { return 0; }
71-
#endif
71+
#endif // !defined(DISABLE_CPU_JITTER_ENTROPY)
7272

7373
// rndr_multiple8 writes |len| number of bytes to |buf| generated using the
7474
// rndr instruction. |len| must be a multiple of 8.

crypto/fipsmodule/rand/entropy/tree_drbg_jitter_entropy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33

4-
#if !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
4+
#if !defined(DISABLE_CPU_JITTER_ENTROPY)
55

66
#include <openssl/ctrdrbg.h>
77
#include <openssl/mem.h>
@@ -538,4 +538,4 @@ OPENSSL_EXPORT int set_thread_and_global_tree_drbg_reseed_counter_FOR_TESTING(
538538
return ret;
539539
}
540540

541-
#endif // !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
541+
#endif // !defined(DISABLE_CPU_JITTER_ENTROPY)

crypto/fipsmodule/rand/entropy/tree_drbg_jitter_entropy_isolated_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
22
// SPDX-License-Identifier: Apache-2.0 OR ISC
33

4-
#if !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
4+
#if !defined(DISABLE_CPU_JITTER_ENTROPY)
55

66
#include <gtest/gtest.h>
77

@@ -554,4 +554,4 @@ TEST(treeDrbgJitterentropyTest, SkippedALL) {
554554

555555
#endif
556556

557-
#endif // !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
557+
#endif // !defined(DISABLE_CPU_JITTER_ENTROPY)

crypto/rand_extra/urandom_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
!defined(BORINGSSL_SHARED_LIBRARY) && \
2929
!defined(BORINGSSL_UNSAFE_DETERMINISTIC_MODE) && \
3030
defined(USE_NR_getrandom) && !defined(AWSLC_SNAPSAFE_TESTING) && \
31-
!defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
31+
!defined(DISABLE_CPU_JITTER_ENTROPY)
3232

3333
#include <linux/types.h>
3434

tests/ci/run_posix_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ echo "Testing building with AArch64 Data-Independent Timing (DIT) on."
3838
build_and_test -DENABLE_DATA_INDEPENDENT_TIMING=ON -DCMAKE_BUILD_TYPE=Release
3939

4040
echo "Testing building with opt-out CPU Jitter Entropy."
41-
build_and_test -DDISABLE_USAGE_OF_CPU_JITTER_ENTROPY=ON
41+
build_and_test -DDISABLE_CPU_JITTER_ENTROPY=ON

tool/speed.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2505,7 +2505,7 @@ static bool SpeedSelfTest(const std::string &selected) {
25052505
}
25062506
#endif
25072507

2508-
#if AWSLC_API_VERSION >= 34 && !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
2508+
#if AWSLC_API_VERSION >= 34 && !defined(DISABLE_CPU_JITTER_ENTROPY)
25092509
static bool SpeedJitter(size_t chunk_size) {
25102510
struct rand_data *jitter_ec = jent_entropy_collector_alloc(0, JENT_FORCE_FIPS);
25112511

@@ -3103,7 +3103,7 @@ bool Speed(const std::vector<std::string> &args) {
31033103
return false;
31043104
}
31053105
#endif
3106-
#if AWSLC_API_VERSION >= 34 && !defined(DO_NOT_USE_CPU_JITTER_ENTROPY)
3106+
#if AWSLC_API_VERSION >= 34 && !defined(DISABLE_CPU_JITTER_ENTROPY)
31073107
if (!SpeedJitter(selected)) {
31083108
return false;
31093109
}

0 commit comments

Comments
 (0)