From c442abe9b4e9224a8b60cad39d3f9ef65794ba97 Mon Sep 17 00:00:00 2001 From: tb Date: Wed, 13 Oct 2021 16:56:30 +0000 Subject: [PATCH] isakmpd: remove libcrypto.c All this does is a call to OpenSSL_add_all_algorithms(), which is no longer needed since libbcrypto initializes itself. ok bluhm sthen (part of a larger diff) --- sbin/isakmpd/Makefile | 4 ++-- sbin/isakmpd/init.c | 3 +-- sbin/isakmpd/libcrypto.c | 44 ---------------------------------------- sbin/isakmpd/libcrypto.h | 5 +---- 4 files changed, 4 insertions(+), 52 deletions(-) delete mode 100644 sbin/isakmpd/libcrypto.c diff --git a/sbin/isakmpd/Makefile b/sbin/isakmpd/Makefile index ca7f1a4b9ea..05079fc8933 100644 --- a/sbin/isakmpd/Makefile +++ b/sbin/isakmpd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.89 2021/02/11 19:41:05 bluhm Exp $ +# $OpenBSD: Makefile,v 1.90 2021/10/13 16:56:30 tb Exp $ # $EOM: Makefile,v 1.78 2000/10/15 21:33:42 niklas Exp $ # @@ -38,7 +38,7 @@ SRCS= app.c attribute.c cert.c connection.c constants.c conf.c \ field.c hash.c if.c ike_auth.c ike_main_mode.c \ ike_phase_1.c ike_quick_mode.c init.c ipsec.c ipsec_fld.c \ ipsec_num.c isakmpd.c isakmp_doi.c isakmp_fld.c isakmp_num.c \ - key.c libcrypto.c log.c message.c \ + key.c log.c message.c \ prf.c sa.c sysdep.c timer.c transport.c virtual.c udp.c \ ui.c util.c x509.c \ pf_key_v2.c policy.c ike_aggressive.c isakmp_cfg.c \ diff --git a/sbin/isakmpd/init.c b/sbin/isakmpd/init.c index 69392b8a435..d2e948acb17 100644 --- a/sbin/isakmpd/init.c +++ b/sbin/isakmpd/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.43 2018/01/15 09:54:48 mpi Exp $ */ +/* $OpenBSD: init.c,v 1.44 2021/10/13 16:56:30 tb Exp $ */ /* $EOM: init.c,v 1.25 2000/03/30 14:27:24 ho Exp $ */ /* @@ -71,7 +71,6 @@ init(void) group_init(); ipsec_init(); isakmp_doi_init(); - libcrypto_init(); timer_init(); diff --git a/sbin/isakmpd/libcrypto.c b/sbin/isakmpd/libcrypto.c deleted file mode 100644 index d66d0fbb4b7..00000000000 --- a/sbin/isakmpd/libcrypto.c +++ /dev/null @@ -1,44 +0,0 @@ -/* $OpenBSD: libcrypto.c,v 1.19 2005/04/08 22:32:10 cloder Exp $ */ -/* $EOM: libcrypto.c,v 1.14 2000/09/28 12:53:27 niklas Exp $ */ - -/* - * Copyright (c) 1999, 2000, 2001 Niklas Hallqvist. All rights reserved. - * Copyright (c) 1999, 2000 Angelos D. Keromytis. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* - * This code was written under funding by Ericsson Radio Systems. - */ - -#include "libcrypto.h" - -void -libcrypto_init(void) -{ - /* Add all algorithms known by SSL */ -#if OPENSSL_VERSION_NUMBER >= 0x00905100L - OpenSSL_add_all_algorithms(); -#else - SSLeay_add_all_algorithms(); -#endif -} diff --git a/sbin/isakmpd/libcrypto.h b/sbin/isakmpd/libcrypto.h index d44b73eedbd..a092f195155 100644 --- a/sbin/isakmpd/libcrypto.h +++ b/sbin/isakmpd/libcrypto.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libcrypto.h,v 1.18 2014/07/11 10:01:00 jsg Exp $ */ +/* $OpenBSD: libcrypto.h,v 1.19 2021/10/13 16:56:30 tb Exp $ */ /* $EOM: libcrypto.h,v 1.16 2000/09/28 12:53:27 niklas Exp $ */ /* @@ -35,7 +35,6 @@ #include -/* XXX I want #include but we appear to not install meth.h */ #include #include #include @@ -44,6 +43,4 @@ #include #include -extern void libcrypto_init(void); - #endif /* _LIBCRYPTO_H_ */ -- 2.20.1