diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-05-20 14:45:24 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-05-20 14:45:24 +0200 |
commit | a114384dbfa6b2346ee9f79a466c3fb2eb12bae4 (patch) | |
tree | 9c65c2a08e89132aacf08db4403e4a4745bd56a5 | |
parent | bb4732efd69571cb0fcf70e2d588b3e1aca7b66c (diff) |
Another market backtrace, not should what happens here. Hope for a user to report it :)
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnManagementThread.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index c10cdb1e..affd8045 100644 --- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java @@ -330,20 +330,20 @@ public class OpenVpnManagementThread implements Runnable { private void processPWCommand(String argument) {
//argument has the form Need 'Private Key' password
- int p1,p2;
+
+ String needed;
try{
- p1 =argument.indexOf('\'');
- p2 = argument.indexOf('\'',p1+1);
- //String needed = argument.replace("Need '", "").replace("' password", "");
+
+ int p1 = argument.indexOf('\'');
+ int p2 = argument.indexOf('\'',p1+1);
+ needed = argument.substring(p1+1, p2);
} catch (StringIndexOutOfBoundsException sioob) {
OpenVPN.logMessage(0, "", "Could not parse management Password command: " + argument);
return;
}
- String needed = argument.substring(p1+1, p2);
String pw=null;
-
if(needed.equals("Private Key")) {
pw = mProfile.getPasswordPrivateKey();
} else if (needed.equals("Auth")) {
|