wolfMQTT icon indicating copy to clipboard operation
wolfMQTT copied to clipboard

Post-Quantum MQTT Support

Open camblor opened this issue 11 months ago • 8 comments

Hello,

I have followed the tutorial given in the README.md about Post-Quantum MQTT Support. When reaching to the point where it's just executing the mqttclient, I got an error.

I have tried with liboqs 0.8.0 and 0.10.0. I do:

$ mkdir build
$ cd build
$ cmake -DOQS_USE_OPENSSL=0 ..
$ make all
$ sudo make install

After installing the library, for every liboqs version, I enter the following in the wolfssl latest version configuration:

$ ./configure --with-liboqs --enable-experimental --enable-kyber=yes,original
$ make all
$ sudo make install

The --enable-experimental is not included in the wolfssl INSTALL file, it just points to --with-liboqs, but I assumed it wouldn't cause any error, so I managed to compile wolfssl and install it with that configuration. The same happens about the --enable-kyber=yes,original, which happens to cause a problem when compiling wolfMQTT if it's not included.

In the instructions, it is said to copy some files from the cert folder of the publisher container:

  • /test/cert/CA.crt
  • /test/cert/publisher.crt
  • /test/cert/publisher.key

And the problem is that when executing the following command:

./examples/mqttclient/mqttclient -h 172.18.0.2 -t -A CA.crt -K publisher.key -c publisher.crt -m "Hello from post-quantum wolfMQTT!!" -n test/sensor1 -Q KYBER_LEVEL1

With every other instruction followed and this setup as base, an error arises:

Error loading CA CA.crt: -148 (ASN oid error, unknown sum id)
MQTT Socket Connect: Error (TLS Connect) (-6)

I would appreciate any help with this problem.

camblor avatar Jan 21 '25 19:01 camblor