diff options
author | Arne Schwabe <arne@rfc2549.org> | 2012-12-31 20:41:28 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2012-12-31 20:41:28 +0100 |
commit | 406a333be3cb781472b2c1315a68606a7941f886 (patch) | |
tree | 146984b04ed01101e6d0ce1f92e01cb1192d6f0f /src/de/blinkt/openvpn/OpenVpnManagementThread.java | |
parent | 1c8e1f9adb41d69829886538e9b2b25a9aeb7bbb (diff) |
Cleanups
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnManagementThread.java')
-rw-r--r-- | src/de/blinkt/openvpn/OpenVpnManagementThread.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/de/blinkt/openvpn/OpenVpnManagementThread.java b/src/de/blinkt/openvpn/OpenVpnManagementThread.java index ee458200..e2a183b9 100644 --- a/src/de/blinkt/openvpn/OpenVpnManagementThread.java +++ b/src/de/blinkt/openvpn/OpenVpnManagementThread.java @@ -411,13 +411,20 @@ public class OpenVpnManagementThread implements Runnable { private void processPWCommand(String argument) {
//argument has the form Need 'Private Key' password
-
+ // or ">PASSWORD:Verification Failed: '%s' ['%s']"
String needed;
+
+
+
try{
int p1 = argument.indexOf('\'');
int p2 = argument.indexOf('\'',p1+1);
needed = argument.substring(p1+1, p2);
+ if (argument.startsWith("Verification Failed")) {
+ proccessPWFailed(needed, argument.substring(p2+1));
+ return;
+ }
} catch (StringIndexOutOfBoundsException sioob) {
OpenVPN.logMessage(0, "", "Could not parse management Password command: " + argument);
return;
@@ -445,6 +452,9 @@ public class OpenVpnManagementThread implements Runnable { + private void proccessPWFailed(String needed, String args) {
+ OpenVPN.updateStateString("AUTH_FAILED", needed + args);
+ }
private void logStatusMessage(String command) {
OpenVPN.logMessage(0,"MGMT:", command);
}
|