diff --git a/F-Droid/src/org/fdroid/fdroid/net/WifiStateChangeService.java b/F-Droid/src/org/fdroid/fdroid/net/WifiStateChangeService.java index 8e470e33c..7b4cbb7c1 100644 --- a/F-Droid/src/org/fdroid/fdroid/net/WifiStateChangeService.java +++ b/F-Droid/src/org/fdroid/fdroid/net/WifiStateChangeService.java @@ -96,26 +96,24 @@ public class WifiStateChangeService extends Service { if (isCancelled()) return null; - try { - LocalRepoKeyStore localRepoKeyStore = LocalRepoKeyStore.get(context); - Certificate localCert = localRepoKeyStore.getCertificate(); - FDroidApp.repo.fingerprint = Utils.calcFingerprint(localCert); + // the fingerprint for the local repo's signing key + LocalRepoKeyStore localRepoKeyStore = LocalRepoKeyStore.get(context); + Certificate localCert = localRepoKeyStore.getCertificate(); + FDroidApp.repo.fingerprint = Utils.calcFingerprint(localCert); - /* - * Once the IP address is known we need to generate a self - * signed certificate to use for HTTPS that has a CN field set - * to the ipAddressString. This must be run in the background - * because if this is the first time the singleton is run, it - * can take a while to instantiate. - */ - if (Preferences.get().isLocalRepoHttpsEnabled()) - localRepoKeyStore.setupHTTPSCertificate(); - - } catch (LocalRepoKeyStore.InitException e) { - Log.e(TAG, "Unable to configure a fingerprint or HTTPS for the local repo: " + e.getMessage()); - Log.e(TAG, Log.getStackTraceString(e)); - } + /* + * Once the IP address is known we need to generate a self + * signed certificate to use for HTTPS that has a CN field set + * to the ipAddressString. This must be run in the background + * because if this is the first time the singleton is run, it + * can take a while to instantiate. + */ + if (Preferences.get().isLocalRepoHttpsEnabled()) + localRepoKeyStore.setupHTTPSCertificate(); + } catch (LocalRepoKeyStore.InitException e) { + Log.e(TAG, "Unable to configure a fingerprint or HTTPS for the local repo: " + e.getMessage()); + Log.e(TAG, Log.getStackTraceString(e)); } catch (InterruptedException e) { Log.e(TAG, Log.getStackTraceString(e)); }