summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/VpnProfile.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2013-08-20 13:27:49 +0200
committerArne Schwabe <arne@rfc2549.org>2013-08-20 13:27:49 +0200
commit8dbfc2cf65c808827058d426cf57932eb9eaefc4 (patch)
tree34e7b9fc9a220b28af2642c2b16139ccff944da3 /src/de/blinkt/openvpn/VpnProfile.java
parent20b5cac307978d787333f4050ce28011f42bcfd0 (diff)
Rename OpenVPN class to a VPNStatus
--HG-- rename : src/de/blinkt/openvpn/core/OpenVPN.java => src/de/blinkt/openvpn/core/VpnStatus.java
Diffstat (limited to 'src/de/blinkt/openvpn/VpnProfile.java')
-rw-r--r--src/de/blinkt/openvpn/VpnProfile.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/de/blinkt/openvpn/VpnProfile.java b/src/de/blinkt/openvpn/VpnProfile.java
index 138386ae..a8c6825f 100644
--- a/src/de/blinkt/openvpn/VpnProfile.java
+++ b/src/de/blinkt/openvpn/VpnProfile.java
@@ -14,7 +14,7 @@ import android.util.Base64;
import android.widget.Toast;
import de.blinkt.openvpn.core.NativeUtils;
-import de.blinkt.openvpn.core.OpenVPN;
+import de.blinkt.openvpn.core.VpnStatus;
import de.blinkt.openvpn.core.OpenVpnService;
import de.blinkt.openvpn.core.X509Utils;
import org.spongycastle.util.io.pem.PemObject;
@@ -549,7 +549,7 @@ public class VpnProfile implements Serializable {
return getKeyStoreCertificates(context, 5);
}
- String[] getKeyStoreCertificates(Context context,int tries) {
+ synchronized String[] getKeyStoreCertificates(Context context,int tries) {
PrivateKey privateKey = null;
X509Certificate[] cachain;
try {
@@ -561,7 +561,7 @@ public class VpnProfile implements Serializable {
cachain = KeyChain.getCertificateChain(context, mAlias);
if (cachain.length <= 1 && !nonNull(mCaFilename)) {
- OpenVPN.logMessage(0, "", context.getString(R.string.keychain_nocacert));
+ VpnStatus.logMessage(0, "", context.getString(R.string.keychain_nocacert));
} else {
StringWriter ksStringWriter = new StringWriter();
@@ -587,7 +587,7 @@ public class VpnProfile implements Serializable {
caout= caoutWriter.toString();
} catch (Exception e) {
- OpenVPN.logError("Could not read CA certificate" + e.getLocalizedMessage());
+ VpnStatus.logError("Could not read CA certificate" + e.getLocalizedMessage());
}
}
@@ -625,10 +625,10 @@ public class VpnProfile implements Serializable {
} catch (IOException e) {
e.printStackTrace();
} catch (KeyChainException e) {
- OpenVPN.logMessage(0, "", context.getString(R.string.keychain_access));
+ VpnStatus.logMessage(0, "", context.getString(R.string.keychain_access));
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.JELLY_BEAN) {
if (!mAlias.matches("^[a-zA-Z0-9]$")) {
- OpenVPN.logError(R.string.jelly_keystore_alphanumeric_bug);
+ VpnStatus.logError(R.string.jelly_keystore_alphanumeric_bug);
}
}
} catch (AssertionError e) {
@@ -814,7 +814,7 @@ public class VpnProfile implements Serializable {
err = e;
}
- OpenVPN.logError(R.string.error_rsa_sign, err.getClass().toString(), err.getLocalizedMessage());
+ VpnStatus.logError(R.string.error_rsa_sign, err.getClass().toString(), err.getLocalizedMessage());
return null;
@@ -852,7 +852,7 @@ public class VpnProfile implements Serializable {
} catch (InvalidKeyException e) {
err = e;
}
- OpenVPN.logError(R.string.error_rsa_sign, err.getClass().toString(), err.getLocalizedMessage());
+ VpnStatus.logError(R.string.error_rsa_sign, err.getClass().toString(), err.getLocalizedMessage());
return null;