From 01fce7f94f6ac8518c0fffddec9b6c06fb406750 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Mon, 22 Jun 2015 12:57:23 -0400 Subject: [PATCH] re-enable Lollipop spongycastle hack It doesn't look like there is an easy way around this, so re-enable it in the new structure. #111 https://gitlab.com/fdroid/fdroidclient/issues/111 --- F-Droid/src/org/fdroid/fdroid/RepoUpdater.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java index 04412da5e..f3cff0b8b 100644 --- a/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java +++ b/F-Droid/src/org/fdroid/fdroid/RepoUpdater.java @@ -136,6 +136,11 @@ public class RepoUpdater { if (downloadedFile == null || !downloadedFile.exists()) throw new UpdateException(repo, downloadedFile + " does not exist!"); + // Due to a bug in Android 5.0 Lollipop, the inclusion of spongycastle causes + // breakage when verifying the signature of the downloaded .jar. For more + // details, check out https://gitlab.com/fdroid/fdroidclient/issues/111. + FDroidApp.disableSpongyCastleOnLollipop(); + JarFile jarFile = new JarFile(downloadedFile, true); JarEntry indexEntry = (JarEntry) jarFile.getEntry("index.xml"); indexInputStream = new ProgressBufferedInputStream(jarFile.getInputStream(indexEntry), @@ -170,6 +175,7 @@ public class RepoUpdater { } catch (SAXException | ParserConfigurationException | IOException e) { throw new UpdateException(repo, "Error parsing index for repo " + repo.address, e); } finally { + FDroidApp.enableSpongyCastleOnLollipop(); Utils.closeQuietly(indexInputStream); if (downloadedFile != null) { downloadedFile.delete();