mirror of
https://github.com/schwabe/ics-openvpn.git
synced 2024-09-19 19:42:29 +02:00
Add log message for unsupported key encryption
This commit is contained in:
parent
841eba8271
commit
12c2b2a9d7
@ -155,7 +155,7 @@ public class OpenVPNThread implements Runnable {
|
||||
logLevel = Math.max(4, logLevel);
|
||||
|
||||
VpnStatus.logMessageOpenVPN(logStatus, logLevel, msg);
|
||||
VpnStatus.checkWeakMD(msg);
|
||||
VpnStatus.addExtraHints(msg);
|
||||
} else {
|
||||
VpnStatus.logInfo("P:" + logline);
|
||||
}
|
||||
|
@ -474,10 +474,13 @@ public class VpnStatus {
|
||||
}
|
||||
|
||||
|
||||
public static void checkWeakMD(String msg) {
|
||||
public static void addExtraHints(String msg) {
|
||||
if ((msg.endsWith("md too weak") && msg.startsWith("OpenSSL: error")) || msg.contains("error:140AB18E")
|
||||
|| msg.contains("SSL_CA_MD_TOO_WEAK") || (msg.contains("ca md too weak")))
|
||||
logError("OpenSSL reported a certificate with a weak hash, please see the in app FAQ about weak hashes.");
|
||||
if ((msg.contains("digital envelope routines::unsupported")))
|
||||
logError("The encryption method of your private keys/pkcs12 might be outdated and you probably need to enable " +
|
||||
"the OpenSSL legacy provider to be able to use this profile.");
|
||||
}
|
||||
|
||||
public static synchronized void updateByteCount(long in, long out) {
|
||||
|
@ -55,7 +55,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable
|
||||
ClientAPI_Status status = connect();
|
||||
if (status.getError()) {
|
||||
VpnStatus.logError(String.format("connect() error: %s: %s", status.getStatus(), status.getMessage()));
|
||||
VpnStatus.checkWeakMD(status.getMessage());
|
||||
VpnStatus.addExtraHints(status.getMessage());
|
||||
} else {
|
||||
VpnStatus.updateStateString("NOPROCESS", "OpenVPN3 thread finished", R.string.state_noprocess, ConnectionStatus.LEVEL_NOTCONNECTED);
|
||||
}
|
||||
@ -306,7 +306,7 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable
|
||||
logmsg = logmsg.substring(0, logmsg.length() - 1);
|
||||
|
||||
VpnStatus.logInfo(logmsg);
|
||||
VpnStatus.checkWeakMD(logmsg);
|
||||
VpnStatus.addExtraHints(logmsg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user