尝试修复从APK文件中读取公钥耗时过长的问题
This commit is contained in:
@ -201,7 +201,7 @@ public class PackageUtils {
|
||||
while (entries.hasMoreElements()) {
|
||||
ZipEntry entry = ((ZipEntry) entries.nextElement());
|
||||
String entryName = entry.getName();
|
||||
if (entryName.contains("CERT.RSA")) {
|
||||
if (entryName.contains(".RSA")) {
|
||||
InputStream is = apkFile.getInputStream(entry);
|
||||
CertificateFactory cf = CertificateFactory.getInstance("X.509");
|
||||
X509Certificate cert = (X509Certificate) cf.generateCertificates(is).toArray()[0];
|
||||
|
||||
Reference in New Issue
Block a user