Andorid的好东西

Google Play提示OpenSSL版本太低的解决方案

2018-01-03  本文已影响31896人  E思无邪

最近一段时间,团队一直再做产品国际化的工作。我们的App做完国际化后也需要发布到google play市场,提交了四次被拒绝四次,每次的反馈信息都是如下:

1.png

第一次被拒,我们检查发现在上传的时候没有配置隐私政策的网址,如是我们专门做了一个隐私政策的H5页面,将地址配置到上传信息的地方,如是欣喜滴提交了。然而,不到三个小时,又收到一封和之前一样的邮件。

然后,我们再次阅读这封邮件,发现第一段中有“ If you submitted an update, the previous version of your app is still available on Google Play.” 如是我们认为是因为之前提交的版本还在google play上,如是我们删除了旧版本记录,再次提交。然而,还是无情的被拒绝。

第三次,我们翻墙查了很多国外的资料,发现是OpenSSL版本太低,我们武断滴认为,是服务器的OpenSSL版本太低,如是我们升级了服务器的OpenSSL版本,再次提交。然而,还是被拒绝,返回的仍旧是这封邮件。

第四次,我们按照邮件的要求,查看了APK中的OpenSSL版本,发现我们的是1.0.2d版本。
具体操作如下:

1. 查看apk使用的OpenSSL的版本

命令行输入

unzip -p Yourapp.apk | strings | grep "OpenSSL"

等待一会, 将会出现类似以下的信息:

MacBook-Pro-2:Desktop yucanghai$ unzip -p YourApp.apk | strings | grep "OpenSSL"
No old-style OpenSSL locks anymore
OpenSSLAdapter::Error(
OpenSSLAdapter::OnCloseEvent(
OpenSSLAdapter::OnConnectEvent
Failed to create OpenSSLCertificate from PEM string.
OpenSSLStreamAdapter::Error(
OpenSSLStreamAdapter::Write(
OpenSSLStreamAdapter::Read(
OpenSSLStreamAdapter::OnEvent SE_OPEN
OpenSSLStreamAdapter::OnEvent
OpenSSLStreamAdapter::OnEvent(SE_CLOSE, 
std::__ndk1::string rtc::OpenSSLKeyPair::PrivateKeyToPEMString() const
std::__ndk1::string rtc::OpenSSLKeyPair::PublicKeyToPEMString() const
OpenSSLAdapter::Error(
OpenSSLAdapter::OnCloseEvent(
OpenSSLAdapter::OnConnectEvent
Could not create OpenSSL wrapper for private key
OpenSSL SYSCALL error, earliest error code in error queue: 
Unknown OpenSSL error 
getOpenSSLHandleForPrivateKey
getOpenSSLEngineForPrivateKey
GetOpenSSLPrivateKeyWrapper() called with invalid key type
OpenSSLAdapter::Error(
OpenSSLAdapter::OnCloseEvent(
OpenSSLAdapter::OnConnectEvent
Failed to create OpenSSLCertificate from PEM string.
OpenSSLStreamAdapter::Error(
OpenSSLStreamAdapter::Write(
OpenSSLStreamAdapter::Read(
OpenSSLStreamAdapter::OnEvent SE_OPEN
OpenSSLStreamAdapter::OnEvent
OpenSSLStreamAdapter::OnEvent(SE_CLOSE, 
OpenSSLDie
DH_OpenSSL
DSA_OpenSSL
ECDSA_OpenSSL
ECDH_OpenSSL
UI_OpenSSL
OpenSSL 1.0.2d 9 Jul 2015
OpenSSL DH Method
OpenSSL X9.42 DH method
OpenSSL PKCS#3 DH method
OpenSSL CMAC method
OpenSSL HMAC method
OpenSSL EC algorithm
OpenSSL RSA method
OpenSSL DSA method
OpenSSL ECDSA method
OpenSSL ECDH method
OpenSSL default
%s(%d): OpenSSL internal error, assertion failed: %s
You need to read the OpenSSL FAQ, http://www.openssl.org/support/faq.html
OpenSSL default user interface
OpenSSL 'dlfcn' shared library method
TLSv1 part of OpenSSL 1.0.2d 9 Jul 2015
SSLv3 part of OpenSSL 1.0.2d 9 Jul 2015
DTLSv1 part of OpenSSL 1.0.2d 9 Jul 2015
SSLv2 part of OpenSSL 1.0.2d 9 Jul 2015
MD5 part of OpenSSL 1.0.2d 9 Jul 2015
SHA1 part of OpenSSL 1.0.2d 9 Jul 2015
SHA-256 part of OpenSSL 1.0.2d 9 Jul 2015
SHA-512 part of OpenSSL 1.0.2d 9 Jul 2015
Big Number part of OpenSSL 1.0.2d 9 Jul 2015
EC part of OpenSSL 1.0.2d 9 Jul 2015
RSA part of OpenSSL 1.0.2d 9 Jul 2015
Diffie-Hellman part of OpenSSL 1.0.2d 9 Jul 2015
Stack part of OpenSSL 1.0.2d 9 Jul 2015
lhash part of OpenSSL 1.0.2d 9 Jul 2015
EVP part of OpenSSL 1.0.2d 9 Jul 2015
ASN.1 part of OpenSSL 1.0.2d 9 Jul 2015
PEM part of OpenSSL 1.0.2d 9 Jul 2015
X.509 part of OpenSSL 1.0.2d 9 Jul 2015
DES part of OpenSSL 1.0.2d 9 Jul 2015
libdes part of OpenSSL 1.0.2d 9 Jul 2015
AES part of OpenSSL 1.0.2d 9 Jul 2015
RC2 part of OpenSSL 1.0.2d 9 Jul 2015
IDEA part of OpenSSL 1.0.2d 9 Jul 2015
DSA part of OpenSSL 1.0.2d 9 Jul 2015
ECDSA part of OpenSSL 1.0.2d 9 Jul 2015
ECDH part of OpenSSL 1.0.2d 9 Jul 2015
RAND part of OpenSSL 1.0.2d 9 Jul 2015
CONF part of OpenSSL 1.0.2d 9 Jul 2015
CONF_def part of OpenSSL 1.0.2d 9 Jul 2015
TXT_DB part of OpenSSL 1.0.2d 9 Jul 2015
No old-style OpenSSL locks anymore
OpenSSLAdapter::Error(
OpenSSLAdapter::OnCloseEvent(
OpenSSLAdapter::OnConnectEvent
Failed to create OpenSSLCertificate from PEM string.
OpenSSLStreamAdapter::Error(
OpenSSLStreamAdapter::Write(
OpenSSLStreamAdapter::Read(
OpenSSLStreamAdapter::OnEvent SE_OPEN
OpenSSLStreamAdapter::OnEvent
OpenSSLStreamAdapter::OnEvent(SE_CLOSE, 
std::__ndk1::string rtc::OpenSSLKeyPair::PublicKeyToPEMString() const
std::__ndk1::string rtc::OpenSSLKeyPair::PrivateKeyToPEMString() const
OpenSSLAdapter::Error(
OpenSSLAdapter::OnCloseEvent(
OpenSSLAdapter::OnConnectEvent
Could not create OpenSSL wrapper for private key
OpenSSL SYSCALL error, earliest error code in error queue: 
Unknown OpenSSL error 
getOpenSSLHandleForPrivateKey
getOpenSSLEngineForPrivateKey
GetOpenSSLPrivateKeyWrapper() called with invalid key type
OpenSSLAdapter::Error(
OpenSSLAdapter::OnCloseEvent(
OpenSSLAdapter::OnConnectEvent
Failed to create OpenSSLCertificate from PEM string.
OpenSSLStreamAdapter::Error(
OpenSSLStreamAdapter::Write(
OpenSSLStreamAdapter::Read(
OpenSSLStreamAdapter::OnEvent SE_OPEN
OpenSSLStreamAdapter::OnEvent
OpenSSLStreamAdapter::OnEvent(SE_CLOSE, 

从上述内容中可以看出我们的OpenSSL是1.0.2d版本。

2. 解决方法

接下来查看工程中哪些的库使用了OpenSSL,如果用到了就升级到最新版本,如果是重复引入的就删除

3. 验证

替换完之后, 清理工程, 重新打包, 用第一步的命令验证。

验证完成后发现APK中的OpenSSL升级到了最新版本,再次提交到应用市场,审核通过。

上一篇下一篇

猜你喜欢

热点阅读