diff options
author | Omar Polo <op@cvs.openbsd.org> | 2023-06-25 08:07:40 +0000 |
---|---|---|
committer | Omar Polo <op@cvs.openbsd.org> | 2023-06-25 08:07:40 +0000 |
commit | 3ceaa1fb7c3c6b76712f5a78454f6448fec2749a (patch) | |
tree | 4496c9fdff77aea1cde5db7c751b16a68a9451e7 /usr.sbin | |
parent | ec8a19751121083cb835f2d24f2cb33e8d4aa049 (diff) |
remove ssl_init()
it's a noop; nowadays both LibreSSL and OpenSSL libcrypto and libssl
initialize themselves automatically before doing anything.
ok tb
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/relayd/config.c | 3 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.c | 5 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.h | 3 | ||||
-rw-r--r-- | usr.sbin/relayd/ssl.c | 24 |
4 files changed, 4 insertions, 31 deletions
diff --git a/usr.sbin/relayd/config.c b/usr.sbin/relayd/config.c index a2f1c130d6b..b8f91bb7ad1 100644 --- a/usr.sbin/relayd/config.c +++ b/usr.sbin/relayd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.43 2021/12/05 13:48:14 jsg Exp $ */ +/* $OpenBSD: config.c,v 1.44 2023/06/25 08:07:38 op Exp $ */ /* * Copyright (c) 2011 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -293,7 +293,6 @@ config_getcfg(struct relayd *env, struct imsg *imsg) } if (env->sc_conf.flags & (F_TLS|F_TLSCLIENT)) { - ssl_init(env); if (what & CONFIG_CA_ENGINE) ca_engine_init(env); } diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c index edc86218960..df93c9527cb 100644 --- a/usr.sbin/relayd/relayd.c +++ b/usr.sbin/relayd/relayd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.c,v 1.190 2022/11/10 00:00:11 mbuhl Exp $ */ +/* $OpenBSD: relayd.c,v 1.191 2023/06/25 08:07:38 op Exp $ */ /* * Copyright (c) 2007 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -255,9 +255,6 @@ main(int argc, char *argv[]) exit(0); } - if (env->sc_conf.flags & (F_TLS|F_TLSCLIENT)) - ssl_init(env); - /* rekey the TLS tickets before pushing the config */ parent_tls_ticket_rekey(0, 0, env); if (parent_configure(env) == -1) diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index 990cec3505f..ca178871a51 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.270 2023/06/21 07:54:54 claudio Exp $ */ +/* $OpenBSD: relayd.h,v 1.271 2023/06/25 08:07:39 op Exp $ */ /* * Copyright (c) 2006 - 2016 Reyk Floeter <reyk@openbsd.org> @@ -1293,7 +1293,6 @@ void script_done(struct relayd *, struct ctl_script *); int script_exec(struct relayd *, struct ctl_script *); /* ssl.c */ -void ssl_init(struct relayd *); char *ssl_load_key(struct relayd *, const char *, off_t *, char *); uint8_t *ssl_update_certificate(const uint8_t *, size_t, EVP_PKEY *, EVP_PKEY *, X509 *, size_t *); diff --git a/usr.sbin/relayd/ssl.c b/usr.sbin/relayd/ssl.c index 0d76f8ba5eb..31eebee64e4 100644 --- a/usr.sbin/relayd/ssl.c +++ b/usr.sbin/relayd/ssl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl.c,v 1.36 2021/12/08 19:25:04 tb Exp $ */ +/* $OpenBSD: ssl.c,v 1.37 2023/06/25 08:07:39 op Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -27,30 +27,11 @@ #include <openssl/ssl.h> #include <openssl/err.h> -#include <openssl/engine.h> #include "relayd.h" int ssl_password_cb(char *, int, int, void *); -void -ssl_init(struct relayd *env) -{ - static int initialized = 0; - - if (initialized) - return; - - SSL_library_init(); - SSL_load_error_strings(); - - /* Init hardware crypto engines. */ - ENGINE_load_builtin_engines(); - ENGINE_register_all_complete(); - - initialized = 1; -} - int ssl_password_cb(char *buf, int size, int rwflag, void *u) { @@ -73,9 +54,6 @@ ssl_load_key(struct relayd *env, const char *name, off_t *len, char *pass) long size; char *data, *buf = NULL; - /* Initialize SSL library once */ - ssl_init(env); - /* * Read (possibly) encrypted key from file */ |