mqtt:mosquitto.url=ssl://test.mosquitto.org:8883
mqtt:mosquitto.user=administrator
mqtt:mosquitto.pwd=mysecret
mqtt:mosquitto.qos=1
mqtt:mosquitto.retain=true
mqtt:mosquitto.async=falseProperties sslProps = new Properties();addSystemProperty("com.ibm.ssl.protocol", sslProps);addSystemProperty("com.ibm.ssl.contextProvider", sslProps);addSystemProperty("com.ibm.ssl.keyStore", sslProps);addSystemProperty("com.ibm.ssl.keyStorePassword", sslProps);addSystemProperty("com.ibm.ssl.keyStoreType", sslProps);addSystemProperty("com.ibm.ssl.keyStoreProvider", sslProps);addSystemProperty("com.ibm.ssl.trustStore", sslProps);addSystemProperty("com.ibm.ssl.trustStorePassword", sslProps);addSystemProperty("com.ibm.ssl.trustStoreType", sslProps);addSystemProperty("com.ibm.ssl.trustStoreProvider", sslProps);addSystemProperty("com.ibm.ssl.enabledCipherSuites", sslProps);addSystemProperty("com.ibm.ssl.keyManager", sslProps);addSystemProperty("com.ibm.ssl.trustManager", sslProps);
Has a search on the internet on an example of how to fill these. Does any one have any openhab documentation on these on how they should be filled?com.ibm.ssl.alias=DefaultSSLSettings com.ibm.ssl.protocol=SSL com.ibm.ssl.securityLevel=HIGH com.ibm.ssl.trustManager=SunX509 com.ibm.ssl.keyManager=SunX509 com.ibm.ssl.contextProvider=SunJSSE com.ibm.ssl.enableSignerExchangePrompt=gui # Keystore information com.ibm.ssl.keyStoreName=ClientDefaultKeyStore com.ibm.ssl.keyStore=${user.root}/etc/keystore.jks com.ibm.ssl.keyStorePassword=keystore_password com.ibm.ssl.keyStoreType=JKS com.ibm.ssl.keyStoreProvider=SUN com.ibm.ssl.keyStoreFileBased=true # Truststore information com.ibm.ssl.trustStoreName=ClientDefaultTrustStore com.ibm.ssl.trustStore=${user.root}/etc/truststore.jks com.ibm.ssl.trustStorePassword=truststore_password com.ibm.ssl.trustStoreType=JKS com.ibm.ssl.trustStoreProvider=SUN com.ibm.ssl.trustStoreFileBased=true
SunJSSE
SunX509SunX509I found this interesting paragraph. this is why the IBM jvm arguements are int he code.
On the client side, Paho has several options for specifying properties for the creation of SSL sockets
(Properties, JVM arguments, etc). However, none of them will work with mosquitto (historically, Paho worked with IBM brokers).
Fortunately, it also accepts a custom made instance of javax.net.ssl.SSLSocketFactory through the method MqttConnectOptions.setSocketFactory() and this works.
com.ibm.ssl.keyStoreProvider=SUN
com.ibm.ssl.trustStoreProvider=SUN