Skip to content

Commit 4c5a72f

Browse files
krish2718carlescufi
authored andcommitted
net: wifi: Fix PEM certificate parsing errors
MbedTLS specifically checks for null-terminator, else it skips PEM format processing and tries to parse it as DER causing parsing failures. Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 48916d6 commit 4c5a72f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ LOG_MODULE_REGISTER(net_wifi_shell, LOG_LEVEL_INF);
3232
#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
3333
static const char ca_cert_test[] = {
3434
#include <wifi_enterprise_test_certs/ca.pem.inc>
35+
'\0'
3536
};
3637

3738
static const char client_cert_test[] = {
3839
#include <wifi_enterprise_test_certs/client.pem.inc>
40+
'\0'
3941
};
4042

4143
static const char client_key_test[] = {
4244
#include <wifi_enterprise_test_certs/client-key.pem.inc>
45+
'\0'
4346
};
4447
#endif
4548

0 commit comments

Comments
 (0)