summaryrefslogtreecommitdiffstats
path: root/net/basicstation/patches/002-fix-tls-makeconf-prototype.patch
blob: 2934f2869650703c306997ed17179f507119ccb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Hauke Mehrtens <hauke@hauke-m.de>
Date: Sat, 28 Nov 2026 03:07:46 +0100
Subject: [PATCH] Use a void parameter list for tls_makeConf

The only caller passes no arguments and the definition ignores all
three declared parameters. Give both a matching C23 prototype.

--- a/src/tls.h
+++ b/src/tls.h
@@ -42,7 +42,7 @@ typedef struct mbedtls_ssl_context* tlsc
 extern u1_t tls_dbgLevel;
 void log_mbedError (u1_t mod_level, int ret, const char* fmt, ...);
 
-tlsconf_t* tls_makeConf      ();
+tlsconf_t* tls_makeConf      (void);
 void       tls_freeConf      (tlsconf_t* conf);
 int        tls_setMyCert     (tlsconf_t* conf, const char* cert, int certlen, const char* key, int keylen, const char* pwd);
 int        tls_setTrustedCAs (tlsconf_t* conf, const char* file_or_data, int len);
--- a/src/tls.c
+++ b/src/tls.c
@@ -107,7 +107,7 @@ void log_mbedError (u1_t mod_level, int
 }
 
 
-tlsconf_t* tls_makeConf (mbedtls_x509_crt* trust, mbedtls_x509_crt* mycert, mbedtls_pk_context* mykey) {
+tlsconf_t* tls_makeConf (void) {
     tlsconf_t* conf = rt_malloc(tlsconf_t);
     mbedtls_ssl_config_init(&conf->sslconfig);
     conf->trust  = NULL;