Skip to content

Commit

Permalink
use AWS_APPSTORE_SAFE cflag to gate access to private APIs (#171)
Browse files Browse the repository at this point in the history
  • Loading branch information
graebm authored Oct 30, 2023
1 parent 5bc0d63 commit b52d9e8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions source/darwin/commoncrypto_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
#include <CommonCrypto/CommonHMAC.h>
#include <CommonCrypto/CommonSymmetricKeywrap.h>

#ifdef AWS_OS_MACOS
#if !defined(AWS_APPSTORE_SAFE)
/* CommonCrypto does not offer public APIs for doing AES GCM.
* There are private APIs for doing it (CommonCryptoSPI.h), but App Store
* submissions that reference these private symbols will be rejected.
*
* Therefore, enable AES GCM via the private APIs on MacOS builds only,
* iOS, watchOS, etc will have to do without. */
* submissions that reference these private symbols will be rejected. */

# define SUPPORT_AES_GCM_VIA_SPI 1
# include "common_cryptor_spi.h"

Expand Down

0 comments on commit b52d9e8

Please sign in to comment.