summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/LeapHttpClient.java
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2013-05-01 18:41:05 +0200
committerParménides GV <parmegv@sdf.org>2013-05-01 18:41:05 +0200
commitff3d469a9549e3670e097fc0e49c043c84e7b7d4 (patch)
tree9fb747e05841020f11d062a86df86bdcdd85e689 /src/se/leap/leapclient/LeapHttpClient.java
parent09493a9dec5fb235d5c4914eb8f8142e3312e246 (diff)
If the app is restarted with a custom provider selected, the client can
request a log in without certificates problems. I've removed the addition of the certificate when downloaded eip-service.json, because I already do that in LeapHttpClient. Solves issue 2367: https://leap.se/code/issues/2367
Diffstat (limited to 'src/se/leap/leapclient/LeapHttpClient.java')
-rw-r--r--src/se/leap/leapclient/LeapHttpClient.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/se/leap/leapclient/LeapHttpClient.java b/src/se/leap/leapclient/LeapHttpClient.java
index d1908c3..f911982 100644
--- a/src/se/leap/leapclient/LeapHttpClient.java
+++ b/src/se/leap/leapclient/LeapHttpClient.java
@@ -51,8 +51,13 @@ public class LeapHttpClient extends DefaultHttpClient {
}
public static LeapHttpClient getInstance(Context context) {
- if(client == null)
+ if(client == null) {
client = new LeapHttpClient(context);
+ String cert_string = ConfigHelper.getStringFromSharedPref(ConfigHelper.cert_key);
+ if(!cert_string.isEmpty()) {
+ ConfigHelper.addTrustedCertificate("recovered_certificate", cert_string);
+ }
+ }
return client;
}
}