summaryrefslogtreecommitdiff
path: root/src/se/leap/openvpn
diff options
context:
space:
mode:
authorSean Leonard <meanderingcode@aetherislands.net>2014-02-28 17:21:36 -0800
committerSean Leonard <meanderingcode@aetherislands.net>2014-02-28 17:21:36 -0800
commitdfc259473a26bb71bca226c8290d227fa954bcb8 (patch)
tree1132b8e00b08bfdd690693bcd9ef25db482bc5d0 /src/se/leap/openvpn
parente6149d1d9ef77409e84d5982a92dd727f0bae2f7 (diff)
parent1fe78d00244f52f903435c970c0ebf0071a08f36 (diff)
Merge branch 'feature/remove-shared-preferences-methods-from-ConfigHelper' into develop
Conflicts: src/se/leap/bitmaskclient/Dashboard.java
Diffstat (limited to 'src/se/leap/openvpn')
-rw-r--r--src/se/leap/openvpn/VpnProfile.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/se/leap/openvpn/VpnProfile.java b/src/se/leap/openvpn/VpnProfile.java
index 99e1c676..481819ad 100644
--- a/src/se/leap/openvpn/VpnProfile.java
+++ b/src/se/leap/openvpn/VpnProfile.java
@@ -22,6 +22,7 @@ import org.spongycastle.util.io.pem.PemObject;
import org.spongycastle.util.io.pem.PemWriter;
import se.leap.bitmaskclient.ConfigHelper;
+import se.leap.bitmaskclient.Dashboard;
import se.leap.bitmaskclient.EIP;
import se.leap.bitmaskclient.Provider;
import se.leap.bitmaskclient.R;
@@ -249,9 +250,10 @@ public class VpnProfile implements Serializable{
cfg+=insertFileData("cert",mClientCertFilename);
*/
// FIXME This is all we need...The whole switch statement can go...
- cfg+="<ca>\n"+ConfigHelper.getStringFromSharedPref(Provider.CA_CERT)+"\n</ca>\n";
- cfg+="<key>\n"+ConfigHelper.getStringFromSharedPref(EIP.PRIVATE_KEY)+"\n</key>\n";
- cfg+="<cert>\n"+ConfigHelper.getStringFromSharedPref(EIP.CERTIFICATE)+"\n</cert>\n";
+ SharedPreferences preferences = context.getSharedPreferences(Dashboard.SHARED_PREFERENCES, context.MODE_PRIVATE);
+ cfg+="<ca>\n"+preferences.getString(Provider.CA_CERT, "")+"\n</ca>\n";
+ cfg+="<key>\n"+preferences.getString(EIP.PRIVATE_KEY, "")+"\n</key>\n";
+ cfg+="<cert>\n"+preferences.getString(EIP.CERTIFICATE, "")+"\n</cert>\n";
break;
case VpnProfile.TYPE_USERPASS_PKCS12: