diff --git a/src/main/java/org/openhab/binding/icomforts30/internal/api/iComfortS30SSLUtil.java b/src/main/java/org/openhab/binding/icomforts30/internal/api/iComfortS30SSLUtil.java index c8ff9b1c0..08af2b91d 100644 --- a/src/main/java/org/openhab/binding/icomforts30/internal/api/iComfortS30SSLUtil.java +++ b/src/main/java/org/openhab/binding/icomforts30/internal/api/iComfortS30SSLUtil.java @@ -162,6 +162,7 @@ private KeyStore makeJavaKeyStore(X509Certificate trustedCert) { byte[] bytes = ((X509Certificate) certs[0]).getEncoded(); if (bytes.length != 0) { + // Certificate obtained successfully return BEGIN_CERT + "\r\n" + Base64.getEncoder().encodeToString(bytes) + "\r\n" + END_CERT; } } catch (NoSuchAlgorithmException | KeyManagementException | IOException e) { @@ -171,6 +172,7 @@ private KeyStore makeJavaKeyStore(X509Certificate trustedCert) { connection.disconnect(); } } + // Failed to obtain certificate return null; } }