summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorOmar Polo <op@cvs.openbsd.org>2023-06-25 08:08:04 +0000
committerOmar Polo <op@cvs.openbsd.org>2023-06-25 08:08:04 +0000
commit828362b6f963c935c45abb17631307483e97cc83 (patch)
tree79138f27553bd73bd75625bc38326fab77dc0136 /usr.sbin
parent3ceaa1fb7c3c6b76712f5a78454f6448fec2749a (diff)
remove ssl_init()
it's a noop; nowadays both LibreSSL and OpenSSL libcrypto and libssl initialize themselves automatically before doing anything. noticed by jsing, ok tb
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/ssl.c25
-rw-r--r--usr.sbin/smtpd/ssl.h3
2 files changed, 2 insertions, 26 deletions
diff --git a/usr.sbin/smtpd/ssl.c b/usr.sbin/smtpd/ssl.c
index 9802ee144e8..ef719264f71 100644
--- a/usr.sbin/smtpd/ssl.c
+++ b/usr.sbin/smtpd/ssl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.c,v 1.99 2023/06/11 10:30:10 op Exp $ */
+/* $OpenBSD: ssl.c,v 1.100 2023/06/25 08:08:03 op Exp $ */
/*
* Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -22,7 +22,6 @@
#include <fcntl.h>
#include <limits.h>
-#include <openssl/engine.h>
#include <openssl/err.h>
#include <openssl/ssl.h>
#include <string.h>
@@ -31,25 +30,6 @@
#include "log.h"
#include "ssl.h"
-void
-ssl_init(void)
-{
- static int inited = 0;
-
- if (inited)
- return;
-
- SSL_library_init();
- SSL_load_error_strings();
-
- OpenSSL_add_all_algorithms();
-
- /* Init hardware crypto engines. */
- ENGINE_load_builtin_engines();
- ENGINE_register_all_complete();
- inited = 1;
-}
-
static char *
ssl_load_file(const char *name, off_t *len, mode_t perm)
{
@@ -140,9 +120,6 @@ ssl_load_key(const char *name, off_t *len, char *pass, mode_t perm, const char *
char mode[12];
char prompt[2048];
- /* Initialize SSL library once */
- ssl_init();
-
/*
* Read (possibly) encrypted key from file
*/
diff --git a/usr.sbin/smtpd/ssl.h b/usr.sbin/smtpd/ssl.h
index 912e6a25f4e..ced63ebd6d4 100644
--- a/usr.sbin/smtpd/ssl.h
+++ b/usr.sbin/smtpd/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.26 2022/02/18 16:57:36 millert Exp $ */
+/* $OpenBSD: ssl.h,v 1.27 2023/06/25 08:08:03 op Exp $ */
/*
* Copyright (c) 2013 Gilles Chehade <gilles@poolp.org>
*
@@ -39,7 +39,6 @@ struct ca {
/* ssl.c */
-void ssl_init(void);
void ssl_error(const char *);
int ssl_load_certificate(struct pki *, const char *);
int ssl_load_keyfile(struct pki *, const char *, const char *);