summaryrefslogtreecommitdiff
path: root/src/ipcpd/unicast/fa.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-03-07 20:54:31 +0100
committerSander Vrijders <sander@ouroboros.rocks>2026-03-14 11:23:59 +0100
commit044da08973957b32703fe338eb95c5171ce471ba (patch)
treefe1b0ce72e4421095deaa555fdaa9de62d664d0e /src/ipcpd/unicast/fa.c
parent4b76e15279792331f886cf756b825fb1e7a1c9ba (diff)
downloadouroboros-044da08973957b32703fe338eb95c5171ce471ba.tar.gz
ouroboros-044da08973957b32703fe338eb95c5171ce471ba.zip
lib: Fix certificate DER encoding and key buffers
i2d_X509() allocated buf->data via OPENSSL_malloc(), but callers free it with freebuf() which uses free(). Fix by allocating with malloc() and encoding directly into the buffer. Also replaces MSGBUFSZ with CRYPT_KEY_BUFSZ (4096) for key material buffers and removes leftover debug logging. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/ipcpd/unicast/fa.c')
-rw-r--r--src/ipcpd/unicast/fa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ipcpd/unicast/fa.c b/src/ipcpd/unicast/fa.c
index ddf78e22..c157d71c 100644
--- a/src/ipcpd/unicast/fa.c
+++ b/src/ipcpd/unicast/fa.c
@@ -58,12 +58,12 @@
#define CLOCK_REALTIME_COARSE CLOCK_REALTIME
#endif
-#define TIMEOUT 10 * MILLION /* nanoseconds */
+#define TIMEOUT 10 * MILLION /* nanoseconds */
+#define MSGBUFSZ 32768
#define FLOW_REQ 0
#define FLOW_REPLY 1
#define FLOW_UPDATE 2
-#define MSGBUFSZ 2048
#define STAT_FILE_LEN 0