summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2017-12-07 15:27:30 +0100
committerFup Duck <fupduck@sacknagel.com>2017-12-07 15:27:30 +0100
commitb99938b1dc32f70800363f0faba88e7fd771abb4 (patch)
treed0527a52f15adb63aeac1c8aa20016377365b50b /app/src/main
parent58900d8452a1c09a55a99c40658437b1a2d3f51a (diff)
Undo renaming of KEY to PROVIDER_KEY
* undo unwanted changes
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderApiBase.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderApiBase.java b/app/src/main/java/se/leap/bitmaskclient/ProviderApiBase.java
index 38981289..6e3b8b08 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderApiBase.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderApiBase.java
@@ -807,7 +807,7 @@ public abstract class ProviderApiBase extends IntentService {
String certificateString = null, keyString = null;
String[] certAndKey = cert_string.split("(?<=-\n)");
for (int i = 0; i < certAndKey.length - 1; i++) {
- if (certAndKey[i].contains("PROVIDER_KEY")) {
+ if (certAndKey[i].contains("KEY")) {
keyString = certAndKey[i++] + certAndKey[i];
} else if (certAndKey[i].contains("CERTIFICATE")) {
certificateString = certAndKey[i++] + certAndKey[i];
@@ -816,7 +816,7 @@ public abstract class ProviderApiBase extends IntentService {
RSAPrivateKey key = ConfigHelper.parseRsaKeyFromString(keyString);
keyString = Base64.encodeToString(key.getEncoded(), Base64.DEFAULT);
- preferences.edit().putString(Constants.PROVIDER_PRIVATE_KEY, "-----BEGIN RSA PRIVATE PROVIDER_KEY-----\n" + keyString + "-----END RSA PRIVATE PROVIDER_KEY-----").commit();
+ preferences.edit().putString(Constants.PROVIDER_PRIVATE_KEY, "-----BEGIN RSA PRIVATE KEY-----\n" + keyString + "-----END RSA PRIVATE KEY-----").commit();
X509Certificate certificate = ConfigHelper.parseX509CertificateFromString(certificateString);
certificateString = Base64.encodeToString(certificate.getEncoded(), Base64.DEFAULT);