summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/OpenVpnManagementThread.java
diff options
context:
space:
mode:
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);
}