summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-12-03 01:43:30 +0100
committercyberta <cyberta@riseup.net>2024-12-11 00:09:34 +0000
commitd7483bc9d1811b122673ec09e58b1ce74955e6c2 (patch)
treeb77f18635cf513c53c32bf5e5cd0539c78be458e /app/src/main/java/se/leap/bitmaskclient
parent49c71037d496e2a7896d087f0ea912159f76a6fd (diff)
keep pem headers and footers when parsing vpn credentials
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/utils/CredentialsParser.java8
1 files changed, 0 insertions, 8 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/utils/CredentialsParser.java b/app/src/main/java/se/leap/bitmaskclient/base/utils/CredentialsParser.java
index e02922fc..a62d548a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/utils/CredentialsParser.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/utils/CredentialsParser.java
@@ -30,22 +30,14 @@ public class CredentialsParser {
switch (currentTag) {
case "ca" -> {
ca = parser.getText();
- ca = ca.replaceAll("-----BEGIN CERTIFICATE-----", "");
- ca = ca.replaceAll("-----END CERTIFICATE-----", "");
ca = ca.trim();
}
case "key" -> {
key = parser.getText();
- key = key.replaceAll("-----BEGIN PRIVATE KEY-----", "");
- key = key.replaceAll("-----BEGIN RSA PRIVATE KEY-----", "");
- key = key.replaceAll("-----END PRIVATE KEY-----", "");
- key = key.replaceAll("-----END RSA PRIVATE KEY-----", "");
key = key.trim();
}
case "cert" -> {
cert = parser.getText();
- cert = cert.replaceAll("-----BEGIN CERTIFICATE-----", "");
- cert = cert.replaceAll("-----END CERTIFICATE-----", "");
cert = cert.trim();
}
}