summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVpnManagementThread.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-12-31 20:41:28 +0100
committerArne Schwabe <arne@rfc2549.org>2012-12-31 20:41:28 +0100
commitd378e3b493737c5283b29e8c49d8c2b289c891fa (patch)
tree08f7a3b1a455015ec4f9e366e5e5a2ef8288dda8 /src/de/blinkt/openvpn/OpenVpnManagementThread.java
parentbbbefe26e6c160bca867dce3188b3679f0fcf2fc (diff)
Cleanups
Diffstat (limited to 'src/de/blinkt/openvpn/OpenVpnManagementThread.java')
-rw-r--r--src/de/blinkt/openvpn/OpenVpnManagementThread.java12
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);
}