From 8d3b03ab73615de0bae2e06b2a35c4cb106896c4 Mon Sep 17 00:00:00 2001 From: op Date: Sun, 25 Jun 2023 08:07:04 +0000 Subject: [PATCH] remove ca_sslinit() it's a noop; nowadays both LibreSSL and OpenSSL libcrypto and libssl initialize themselves automatically before doing anything. spotted by tb, ok tb tobhe --- sbin/iked/ca.c | 14 +------------- sbin/iked/iked.c | 3 +-- sbin/iked/iked.h | 3 +-- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/sbin/iked/ca.c b/sbin/iked/ca.c index 7f7c8bee0d3..93ccda1e698 100644 --- a/sbin/iked/ca.c +++ b/sbin/iked/ca.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ca.c,v 1.93 2023/06/17 22:33:34 tobhe Exp $ */ +/* $OpenBSD: ca.c,v 1.94 2023/06/25 08:07:04 op Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter @@ -33,7 +33,6 @@ #include #include -#include #include #include #include @@ -1958,17 +1957,6 @@ ca_x509_subjectaltname_get(X509 *cert, struct iked_id *retid) return ca_x509_subjectaltname_do(cert, MODE_ALT_GET, NULL, NULL, retid); } -void -ca_sslinit(void) -{ - OpenSSL_add_all_algorithms(); - ERR_load_crypto_strings(); - - /* Init hardware crypto engines. */ - ENGINE_load_builtin_engines(); - ENGINE_register_all_complete(); -} - void ca_sslerror(const char *caller) { diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c index aa824d6f196..7af05d9a607 100644 --- a/sbin/iked/iked.c +++ b/sbin/iked/iked.c @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.c,v 1.64 2023/03/05 22:17:22 tobhe Exp $ */ +/* $OpenBSD: iked.c,v 1.65 2023/06/25 08:07:04 op Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -175,7 +175,6 @@ main(int argc, char *argv[]) if (strlcpy(env->sc_conffile, conffile, PATH_MAX) >= PATH_MAX) errx(1, "config file exceeds PATH_MAX"); - ca_sslinit(); group_init(); policy_init(env); diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h index 85958e1c237..b220f189041 100644 --- a/sbin/iked/iked.h +++ b/sbin/iked/iked.h @@ -1,4 +1,4 @@ -/* $OpenBSD: iked.h,v 1.218 2023/06/19 17:19:50 claudio Exp $ */ +/* $OpenBSD: iked.h,v 1.219 2023/06/25 08:07:04 op Exp $ */ /* * Copyright (c) 2019 Tobias Heider @@ -1178,7 +1178,6 @@ int ca_setauth(struct iked *, struct iked_sa *, void ca_getkey(struct privsep *, struct iked_id *, enum imsg_type); int ca_privkey_serialize(EVP_PKEY *, struct iked_id *); int ca_pubkey_serialize(EVP_PKEY *, struct iked_id *); -void ca_sslinit(void); void ca_sslerror(const char *); char *ca_asn1_name(uint8_t *, size_t); void *ca_x509_name_parse(char *); -- 2.20.1