-/* $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>
}
if (env->sc_conf.flags & (F_TLS|F_TLSCLIENT)) {
- ssl_init(env);
if (what & CONFIG_CA_ENGINE)
ca_engine_init(env);
}
-/* $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>
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)
-/* $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>
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 *);
-/* $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>
#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)
{
long size;
char *data, *buf = NULL;
- /* Initialize SSL library once */
- ssl_init(env);
-
/*
* Read (possibly) encrypted key from file
*/