davidepianca98 / KMQTT

Kotlin Multiplatform MQTT client & embeddable and standalone broker
MIT License
188 stars 29 forks source link

KMQTT Broker - Provide a method to add SecretKeyFactory algorithm to decrypt the PKCS12 file if device doesn't have it by default. #55

Open nishankhadka09 opened 3 months ago

nishankhadka09 commented 3 months ago

Ran the KMQTT Broker on Android10 with TLS enabled. Ran into the following exception:

java.io.IOException: exception decrypting data - java.security.NoSuchAlgorithmException: 1.2.840.113549.1.5.12 SecretKeyFactory not available at com.android.org.bouncycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.cryptData(PKCS12KeyStoreSpi.java:730) at com.android.org.bouncycastle.jcajce.provider.keystore.pkcs12.PKCS12KeyStoreSpi.engineLoad(PKCS12KeyStoreSpi.java:978) at java.security.KeyStore.load(KeyStore.java:1484) at socket.tls.TLSServerSocket.(TLSServerSocket.kt:32) at socket.ServerSocketLoop.(ServerSocketLoop.kt:15) at mqtt.broker.Broker.(Broker.kt:50) at mqtt.broker.Broker.(Unknown Source:0) at mqtt.broker.Broker.(Broker.kt:20)

davidepianca98 commented 3 months ago

Hey, thank you for posting the issue, I will look into this in the next weeks