90 lines
2.1 KiB
Diff
90 lines
2.1 KiB
Diff
From c271800aeb027f3f8c0b1f2463a06e3f5a948f20 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Terje=20R=C3=B8sten?= <terjeros@gmail.com>
|
|
Date: Thu, 6 Aug 2026 19:46:04 +0200
|
|
Subject: [PATCH] Remove obsolete SSL engine support
|
|
|
|
---
|
|
src/ssl.c | 31 +++++--------------------------
|
|
1 file changed, 5 insertions(+), 26 deletions(-)
|
|
|
|
diff --git a/src/ssl.c b/src/ssl.c
|
|
index f5bee81..77fc923 100644
|
|
--- a/src/ssl.c
|
|
+++ b/src/ssl.c
|
|
@@ -24,6 +24,7 @@
|
|
#include "../config.h"
|
|
#endif /* HAVE_CONFIG_H */
|
|
|
|
+#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/socket.h> /* basic socket definitions */
|
|
@@ -36,7 +37,7 @@
|
|
#include <netinet/tcp.h>
|
|
#include <inttypes.h>
|
|
#include <openssl/ssl.h>
|
|
-#include <openssl/engine.h>
|
|
+#include <openssl/err.h>
|
|
#include <pthread.h>
|
|
#include <string.h>
|
|
#include "logging.h"
|
|
@@ -67,7 +68,7 @@ static protocol_t *protocol_ssl_new();
|
|
static SSL_CTX *initialize_ctx(char *keyfile, char *password,
|
|
const char *method);
|
|
static int pwd_cb(char *buf, int num, int rwflag, void *userdata);
|
|
-static int load_engine(const char *engine_id);
|
|
+static int load_engine(const char *engine_id __attribute__((unused)));
|
|
static SSL_CTX *ctx;
|
|
|
|
|
|
@@ -137,12 +138,6 @@ file_present(char *file)
|
|
return (0);
|
|
}
|
|
|
|
-static void
|
|
-ssl_cleanup(void)
|
|
-{
|
|
- ENGINE_cleanup();
|
|
-}
|
|
-
|
|
/* Called only once during beginning of the program */
|
|
int
|
|
ssl_init(void *arg)
|
|
@@ -173,12 +168,6 @@ ssl_init(void *arg)
|
|
}
|
|
CRYPTO_set_id_callback((unsigned long (*)())id_function);
|
|
CRYPTO_set_locking_callback((void (*)())locking_function);
|
|
-
|
|
- /*
|
|
- * We also register an atexit function to cleanup the ENGINE
|
|
- * datastructures
|
|
- */
|
|
- atexit(ssl_cleanup);
|
|
return (0);
|
|
}
|
|
|
|
@@ -434,19 +423,9 @@ pwd_cb(char *buf, int num, int rwflag, void *userdata)
|
|
}
|
|
|
|
static int
|
|
-load_engine(const char *engine_id)
|
|
+load_engine(const char *engine_id __attribute__((unused)))
|
|
{
|
|
- ENGINE *e;
|
|
-
|
|
- if (!engine_id)
|
|
- return (-1);
|
|
- ENGINE_load_builtin_engines();
|
|
- e = ENGINE_by_id(engine_id);
|
|
- if (!e) {
|
|
- return (-1);
|
|
- }
|
|
- ENGINE_register_complete(e);
|
|
- return (0);
|
|
+ return (-1);
|
|
}
|
|
|
|
static protocol_t *
|
|
--
|
|
2.55.0
|
|
|