Skip to content
This repository has been archived by the owner on Sep 21, 2020. It is now read-only.

Commit

Permalink
bug fix: get cert file entry from jar file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dong Liu committed Mar 3, 2015
1 parent 3eb6fa2 commit d7a86d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main/java/net/dongliu/apk/parser/ApkParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ private void parseCertificate() throws IOException, CertificateEncodingException
ZipArchiveEntry entry = null;
Enumeration<ZipArchiveEntry> enu = zf.getEntries();
while (enu.hasMoreElements()) {
entry = enu.nextElement();
if (entry.isDirectory()) {
ZipArchiveEntry ne = enu.nextElement();
if (ne.isDirectory()) {
continue;
}
if (entry.getName().toUpperCase().endsWith(".RSA")
|| entry.getName().toUpperCase().endsWith(".DSA")) {
if (ne.getName().toUpperCase().endsWith(".RSA")
|| ne.getName().toUpperCase().endsWith(".DSA")) {
entry = ne;
break;
}
}
Expand Down

0 comments on commit d7a86d4

Please sign in to comment.