From b52d9e8ee7af8155e6928c977ec5fde25a507ba0 Mon Sep 17 00:00:00 2001 From: Michael Graeb Date: Mon, 30 Oct 2023 16:21:57 -0700 Subject: [PATCH] use AWS_APPSTORE_SAFE cflag to gate access to private APIs (#171) --- source/darwin/commoncrypto_aes.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/darwin/commoncrypto_aes.c b/source/darwin/commoncrypto_aes.c index 554e605c..64dbfd43 100644 --- a/source/darwin/commoncrypto_aes.c +++ b/source/darwin/commoncrypto_aes.c @@ -9,13 +9,11 @@ #include #include -#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"