summaryrefslogtreecommitdiff
path: root/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2021-10-15 02:02:38 +0200
committerArne Schwabe <arne@rfc2549.org>2021-10-15 02:02:38 +0200
commit59e2992331f08dfa2799496c18109b93a382b078 (patch)
tree909bb146a0231d7d831a59c6cfded31cd58cc4a1 /main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
parentf8249f98f37c7b75e56f007c892aab0c7d3e4dca (diff)
Improve detection and logging of weak md error FAQ hint
Diffstat (limited to 'main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
index e325f8b7..04848f93 100644
--- a/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
+++ b/main/src/main/java/de/blinkt/openvpn/core/VpnStatus.java
@@ -469,11 +469,17 @@ public class VpnStatus {
}
public static void logMessageOpenVPN(LogLevel level, int ovpnlevel, String message) {
+ /* Check for the weak md whe we have a message from OpenVPN */
newLogItem(new LogItem(level, ovpnlevel, message));
-
}
+ public static void checkWeakMD(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.");
+ }
+
public static synchronized void updateByteCount(long in, long out) {
TrafficHistory.LastDiff diff = trafficHistory.add(in, out);