Skip to content

Instantly share code, notes, and snippets.

View jimrok's full-sized avatar
🏠
Working from home

jimrok

🏠
Working from home
View GitHub Profile
@jimrok
jimrok / TestMQTT.java
Last active April 17, 2024 06:10
A simple java code for SSL/TLS connection from Paho java client to mosquitto MQTT broker
package test_mqtt;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.FileReader;
import java.security.KeyPair;
import java.security.KeyStore;
import java.security.Security;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;