summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderApiBase.java4
-rw-r--r--app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java8
2 files changed, 6 insertions, 6 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);
diff --git a/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java b/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java
index 25aba956..7e60edb9 100644
--- a/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java
+++ b/app/src/test/java/se/leap/bitmaskclient/eip/VpnConfigGeneratorTest.java
@@ -62,7 +62,7 @@ public class VpnConfigGeneratorTest {
"\n" +
"</ca>\n" +
"<key>\n" +
- "-----BEGIN RSA PRIVATE PROVIDER_KEY-----\n" +
+ "-----BEGIN RSA PRIVATE KEY-----\n" +
"MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQDUTYWeGgsHS+fjijmziniNqw6h\n" +
"MBpyK4S/cM6PxV28C33VuOWPTMcIYesctjZANWFCggfFTQSjV5Qaxq9UK4i27tayLbCdlVS6hpbl\n" +
"Vf4DuI3Gj1Pv1rtITBShtvCf3T7yBnjW4wVpOpsUAAOViKUSvUU3kPPMFWhiGQw8yHYr82ts6XMo\n" +
@@ -85,7 +85,7 @@ public class VpnConfigGeneratorTest {
"ispy6Y0CgYEAgl1o2lo+ACyk+oVQPaaPqK3d7WOBFp4eR2nXFor/vsx9igQOlZUgzRDQsR8jo1o9\n" +
"efOSBf87igrZGgssys89pWa2dnXnz5PMmzkKr6bw4D9Ez6u6Puc9UZhGw/8wDYg6fSosdB9utspm\n" +
"M698ycef7jBNMDgmhpSvfw5GctoNQ4s=\n" +
- "-----END RSA PRIVATE PROVIDER_KEY-----\n" +
+ "-----END RSA PRIVATE KEY-----\n" +
"</key>\n" +
"<cert>\n" +
"-----BEGIN CERTIFICATE-----\n" +
@@ -160,7 +160,7 @@ public class VpnConfigGeneratorTest {
"\n" +
"</ca>\n" +
"<key>\n" +
- "-----BEGIN RSA PRIVATE PROVIDER_KEY-----\n" +
+ "-----BEGIN RSA PRIVATE KEY-----\n" +
"MIIEwAIBADANBgkqhkiG9w0BAQEFAASCBKowggSmAgEAAoIBAQDUTYWeGgsHS+fjijmziniNqw6h\n" +
"MBpyK4S/cM6PxV28C33VuOWPTMcIYesctjZANWFCggfFTQSjV5Qaxq9UK4i27tayLbCdlVS6hpbl\n" +
"Vf4DuI3Gj1Pv1rtITBShtvCf3T7yBnjW4wVpOpsUAAOViKUSvUU3kPPMFWhiGQw8yHYr82ts6XMo\n" +
@@ -183,7 +183,7 @@ public class VpnConfigGeneratorTest {
"ispy6Y0CgYEAgl1o2lo+ACyk+oVQPaaPqK3d7WOBFp4eR2nXFor/vsx9igQOlZUgzRDQsR8jo1o9\n" +
"efOSBf87igrZGgssys89pWa2dnXnz5PMmzkKr6bw4D9Ez6u6Puc9UZhGw/8wDYg6fSosdB9utspm\n" +
"M698ycef7jBNMDgmhpSvfw5GctoNQ4s=\n" +
- "-----END RSA PRIVATE PROVIDER_KEY-----\n" +
+ "-----END RSA PRIVATE KEY-----\n" +
"</key>\n" +
"<cert>\n" +
"-----BEGIN CERTIFICATE-----\n" +