Skip to content

Commit 20dace0

Browse files
committed
add option and doc for AWS_APPSTORE_SAFE
1 parent 828bbbc commit 20dace0

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ if (LEGACY_BUILD)
6969
option(ENABLE_SMOKE_TESTS "Enable smoke tests" OFF)
7070
option(ENABLE_PROTOCOL_TESTS "Enable protocol tests" OFF)
7171
option(DISABLE_DNS_REQUIRED_TESTS "Disable unit tests that require DNS lookup to succeed, useful when using a http client that does not perform DNS lookup" OFF)
72+
option(AWS_APPSTORE_SAFE "Remove reference to private Apple APIs for AES GCM in Common Crypto. If set to OFF you application will get rejected from the apple app store." OFF)
7273

7374

7475
set(AWS_USER_AGENT_CUSTOMIZATION "" CACHE STRING "User agent extension")
@@ -95,6 +96,10 @@ if (LEGACY_BUILD)
9596
add_definitions(-DDISABLE_DNS_REQUIRED_TESTS)
9697
endif ()
9798

99+
if (AWS_APPSTORE_SAFE)
100+
add_definitions(-DAWS_APPSTORE_SAFE)
101+
endif ()
102+
98103
#From https://stackoverflow.com/questions/18968979/how-to-get-colorized-output-with-cmake
99104
if (NOT WIN32)
100105
string(ASCII 27 Esc)

docs/CMake_Parameters.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,7 @@ An override path for where the build system should find the Android NDK. By def
177177

178178
### AWS_USE_CRYPTO_SHARED_LIBS
179179
Forces FindCrypto to use a shared crypto library if found. regardless of the value of BUILD_SHARED_LIBS
180+
181+
182+
### AWS_APPSTORE_SAFE
183+
One of our dependencies [aws-c-cal](https://github.com/awslabs/aws-c-cal) links against several [CommonCrypto](https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/Common%20Crypto.3cc.html) APIs that will cause a binary application using these APIs to be rejected from the apple appstore. This will set the corresponding [definition ia aws-c-cal](https://github.com/awslabs/aws-c-cal/blob/027d9760908c649d1f53e397d74d907babbde059/source/darwin/commoncrypto_aes.c#L12-L16) that will no-op AES-GCM functionality. This option is turned `OFF` by default as to no t break AWS-GCM functionality by default.

0 commit comments

Comments
 (0)