APP Store审核失败因为references non-public symbols

APP Store审核没通过,具体内容如下:

Dear developer,

Non-public API usage:

The app references non-public symbols in bandu: _getcontext, _makecontext, _setcontext
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
Regards,
The App Store team

经过分析查找定位到时应为openssl导致的问题;

我当前使用的openssl版本是:openssl-1.1.0c

# nm libcrypto.a | grep 'context'
0000000000000060 T _async_fibre_makecontext
                 U _getcontext
                 U _makecontext
                 U _async_fibre_makecontext
00000000000000b0 t _async_fibre_swapcontext
                 U _setcontext
0000000000000070 T _padlock_verify_context
然后源码查找getcontext,
# find ./crypto/async/ -name '*.*' | xargs grep 'getcontext'
./crypto/async//arch/async_posix.c:     * Some platforms provide getcontext() but it does not work (notably
./crypto/async//arch/async_posix.c:     * MacOSX PPC64). Check for a working getcontext();
./crypto/async//arch/async_posix.c:    return getcontext(&ctx) == 0;
./crypto/async//arch/async_posix.c:    if (getcontext(&fibre->fibre) == 0) {

定位到是在async_posix.c里面使用了这些函数。

分析crypto/async目录下的文件包含的布局及async_posix.h的内容:

#if (defined(OPENSSL_SYS_UNIX) || defined(OPENSSL_SYS_CYGWIN)) \
    && defined(OPENSSL_THREADS) && !defined(OPENSSL_NO_ASYNC) \
    && !defined(__ANDROID__) && !defined(__OpenBSD__)

发现一个宏定义:!defined(OPENSSL_NO_ASYNC) ,如果不使用异步功能,可以在编译的时候直接定义OPENSSL_NO_ASYNC

然后重新编译openssl

./Configure target  no-shared -DOPENSSL_NO_ASYNC

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值