diff --git a/jNut/src/main/java/org/networkupstools/jnut/Client.java b/jNut/src/main/java/org/networkupstools/jnut/Client.java index f0dc912..837628f 100644 --- a/jNut/src/main/java/org/networkupstools/jnut/Client.java +++ b/jNut/src/main/java/org/networkupstools/jnut/Client.java @@ -290,8 +290,9 @@ public void connect() throws IOException, UnknownHostException, NutException // is half-way secure): if (!isValidProtocolVersion()) { if (sslConfig.isForceSSL()) { - throw new NutException("STARTTLS-FAILED", "SSL setup failed but it is required"); + throw new NutException("STARTTLS-FAILED", "STARTTLS setup claimed to succeed, but protocol version check in the secured session failed, and SSL is required"); } + // TODO: Drop SSL context or restart the connection as plaintext if SSL is not required? } } @@ -748,7 +749,7 @@ public boolean enableTrackingModeOnce() throws IOException, NutException { public String getTrackingResult(TrackingID id) throws IOException, NutException { if (id == null || !id.isValid()) return null; - String res = get("TRACKING", id.getId()); + String res = query("GET TRACKING", id.getId()); if (res == null) return null; detectError(res);