Skip to content

Commit 755109b

Browse files
PR #492: Fix MQTT TLS certificate paths and add timing resistance
- Move certificate paths to user_settings.h - Add security hardening options - Fix circular dependency between mqtt headers Co-Authored-By: [email protected] <[email protected]>
1 parent 83d3240 commit 755109b

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

fullstack/freertos-wolfip-wolfmqtt/include/user_settings.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
#define _GNU_SOURCE
2727
#endif
2828

29+
/* Security hardening */
30+
#define WC_RSA_BLINDING
31+
#define ECC_TIMING_RESISTANT
32+
#define WC_TIMING_RESISTANT
33+
34+
/* TLS Certificate Paths */
35+
#define MQTT_TLS_CA_CERT "../../../wolfssl/certs/ca-cert.pem"
36+
#define MQTT_TLS_CLIENT_CERT "../../../wolfssl/certs/client-cert.pem"
37+
#define MQTT_TLS_CLIENT_KEY "../../../wolfssl/certs/client-key.pem"
38+
2939
/* wolfSSL TLS configuration */
3040
#define WOLFSSL_TLS13
3141
#define WOLFSSL_TLS13_NO_OLD_TLS

fullstack/freertos-wolfip-wolfmqtt/src/mqtt_client.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ word16 mqtt_get_packetid(void);
3838
#define MQTT_CLIENT_ID "FreeRTOS_Client"
3939
#define MQTT_TEST_TOPIC "test/topic"
4040

41-
/* TLS Configuration */
42-
#define MQTT_TLS_CA_CERT "../../../wolfssl/certs/ca-cert.pem"
43-
#define MQTT_TLS_CLIENT_CERT "../../../wolfssl/certs/client-cert.pem"
44-
#define MQTT_TLS_CLIENT_KEY "../../../wolfssl/certs/client-key.pem"
45-
4641
/* Task Configuration */
4742
#define MQTT_TASK_STACK_SIZE (16 * 1024)
4843
#define MQTT_TASK_PRIORITY (tskIDLE_PRIORITY + 2)

fullstack/freertos-wolfip-wolfmqtt/src/mqtt_net.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#ifndef MQTT_NET_H
2323
#define MQTT_NET_H
2424

25+
#include "../include/user_settings.h"
2526
#include "wolfip.h"
2627
#include <wolfssl/ssl.h>
2728
#include <wolfmqtt/mqtt_client.h>

0 commit comments

Comments
 (0)