From 1886fa31e0f415273e230e44b845bd44a597ec65 Mon Sep 17 00:00:00 2001 From: tb Date: Thu, 23 Oct 2025 05:26:25 +0000 Subject: [PATCH] rpki-client regress: remove unnecessary libcrypto init/cleanup --- regress/usr.sbin/rpki-client/test-aspa.c | 9 +-------- regress/usr.sbin/rpki-client/test-cert.c | 9 +-------- regress/usr.sbin/rpki-client/test-gbr.c | 10 +--------- regress/usr.sbin/rpki-client/test-geofeed.c | 10 +--------- regress/usr.sbin/rpki-client/test-ip.c | 8 +------- regress/usr.sbin/rpki-client/test-mft.c | 9 +-------- regress/usr.sbin/rpki-client/test-roa.c | 9 +-------- regress/usr.sbin/rpki-client/test-rsc.c | 9 +-------- regress/usr.sbin/rpki-client/test-spl.c | 9 +-------- regress/usr.sbin/rpki-client/test-tak.c | 9 +-------- regress/usr.sbin/rpki-client/test-tal.c | 10 +--------- 11 files changed, 11 insertions(+), 90 deletions(-) diff --git a/regress/usr.sbin/rpki-client/test-aspa.c b/regress/usr.sbin/rpki-client/test-aspa.c index e4cb0e2c780..db889155c57 100644 --- a/regress/usr.sbin/rpki-client/test-aspa.c +++ b/regress/usr.sbin/rpki-client/test-aspa.c @@ -1,4 +1,4 @@ -/* $Id: test-aspa.c,v 1.10 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-aspa.c,v 1.11 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2022 Job Snijders * Copyright (c) 2019 Kristaps Dzonsons @@ -45,9 +45,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "pv")) != -1) @@ -88,10 +85,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-cert.c b/regress/usr.sbin/rpki-client/test-cert.c index 03cf025fe49..bf0f975e344 100644 --- a/regress/usr.sbin/rpki-client/test-cert.c +++ b/regress/usr.sbin/rpki-client/test-cert.c @@ -1,4 +1,4 @@ -/* $Id: test-cert.c,v 1.26 2025/07/15 09:26:19 tb Exp $ */ +/* $Id: test-cert.c,v 1.27 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -43,9 +43,6 @@ main(int argc, char *argv[]) int c, i, verb = 0, ta = 0; struct cert *p; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "tv")) != -1) @@ -113,10 +110,6 @@ main(int argc, char *argv[]) } } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-gbr.c b/regress/usr.sbin/rpki-client/test-gbr.c index c2c1c219047..3c65cc9d9f9 100644 --- a/regress/usr.sbin/rpki-client/test-gbr.c +++ b/regress/usr.sbin/rpki-client/test-gbr.c @@ -1,4 +1,4 @@ -/* $Id: test-gbr.c,v 1.20 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-gbr.c,v 1.21 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -44,10 +44,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "pv")) != -1) @@ -88,10 +84,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-geofeed.c b/regress/usr.sbin/rpki-client/test-geofeed.c index 69ccd946707..0f52f2ef416 100644 --- a/regress/usr.sbin/rpki-client/test-geofeed.c +++ b/regress/usr.sbin/rpki-client/test-geofeed.c @@ -1,4 +1,4 @@ -/* $Id: test-geofeed.c,v 1.9 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-geofeed.c,v 1.10 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -44,10 +44,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "pv")) != -1) @@ -88,10 +84,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-ip.c b/regress/usr.sbin/rpki-client/test-ip.c index b996af652fd..c54635e94a7 100644 --- a/regress/usr.sbin/rpki-client/test-ip.c +++ b/regress/usr.sbin/rpki-client/test-ip.c @@ -1,4 +1,4 @@ -/* $Id: test-ip.c,v 1.11 2024/08/23 12:56:26 anton Exp $ */ +/* $Id: test-ip.c,v 1.12 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -81,10 +81,6 @@ test(const char *res, uint16_t afiv, size_t sz, size_t unused, ...) int main(int argc, char *argv[]) { - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); - test("10.5.0.4/32", 1, 0x04, 0x00, 0x0a, 0x05, 0x00, 0x04); @@ -124,8 +120,6 @@ main(int argc, char *argv[]) test("129.64.0.0/10", 1, 0x02, 0x06, 0x81, 0x40); - ERR_free_strings(); - printf("OK\n"); return 0; } diff --git a/regress/usr.sbin/rpki-client/test-mft.c b/regress/usr.sbin/rpki-client/test-mft.c index c466eb3c128..3df1e467436 100644 --- a/regress/usr.sbin/rpki-client/test-mft.c +++ b/regress/usr.sbin/rpki-client/test-mft.c @@ -1,4 +1,4 @@ -/* $Id: test-mft.c,v 1.31 2025/07/20 12:01:40 tb Exp $ */ +/* $Id: test-mft.c,v 1.32 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -47,9 +47,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while (-1 != (c = getopt(argc, argv, "pv"))) @@ -90,10 +87,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-roa.c b/regress/usr.sbin/rpki-client/test-roa.c index 3d67c64cc19..fdcc340c2ae 100644 --- a/regress/usr.sbin/rpki-client/test-roa.c +++ b/regress/usr.sbin/rpki-client/test-roa.c @@ -1,4 +1,4 @@ -/* $Id: test-roa.c,v 1.28 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-roa.c,v 1.29 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -44,9 +44,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "pv")) != -1) @@ -87,10 +84,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-rsc.c b/regress/usr.sbin/rpki-client/test-rsc.c index 4568e66f072..6decab2d2ec 100644 --- a/regress/usr.sbin/rpki-client/test-rsc.c +++ b/regress/usr.sbin/rpki-client/test-rsc.c @@ -1,4 +1,4 @@ -/* $Id: test-rsc.c,v 1.13 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-rsc.c,v 1.14 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -47,9 +47,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while (-1 != (c = getopt(argc, argv, "pv"))) @@ -90,10 +87,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-spl.c b/regress/usr.sbin/rpki-client/test-spl.c index 5b4d2fb8ea0..5cbb94ce4b6 100644 --- a/regress/usr.sbin/rpki-client/test-spl.c +++ b/regress/usr.sbin/rpki-client/test-spl.c @@ -1,4 +1,4 @@ -/* $Id: test-spl.c,v 1.5 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-spl.c,v 1.6 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2024 Job Snijders * Copyright (c) 2019 Kristaps Dzonsons @@ -45,9 +45,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "pv")) != -1) @@ -88,10 +85,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-tak.c b/regress/usr.sbin/rpki-client/test-tak.c index 1047b4486c3..9b1706aea8f 100644 --- a/regress/usr.sbin/rpki-client/test-tak.c +++ b/regress/usr.sbin/rpki-client/test-tak.c @@ -1,4 +1,4 @@ -/* $Id: test-tak.c,v 1.10 2025/07/20 07:49:47 tb Exp $ */ +/* $Id: test-tak.c,v 1.11 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2022 Job Snijders * Copyright (c) 2019 Kristaps Dzonsons @@ -45,9 +45,6 @@ main(int argc, char *argv[]) unsigned char *buf; size_t len; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); x509_init_oid(); while ((c = getopt(argc, argv, "pv")) != -1) @@ -88,10 +85,6 @@ main(int argc, char *argv[]) cert = NULL; } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]); diff --git a/regress/usr.sbin/rpki-client/test-tal.c b/regress/usr.sbin/rpki-client/test-tal.c index f9a83c2fad6..c7a0cec89d5 100644 --- a/regress/usr.sbin/rpki-client/test-tal.c +++ b/regress/usr.sbin/rpki-client/test-tal.c @@ -1,4 +1,4 @@ -/* $Id: test-tal.c,v 1.14 2024/04/22 05:54:01 claudio Exp $ */ +/* $Id: test-tal.c,v 1.15 2025/10/23 05:26:25 tb Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -42,10 +42,6 @@ main(int argc, char *argv[]) size_t len; struct tal *tal; - ERR_load_crypto_strings(); - OpenSSL_add_all_ciphers(); - OpenSSL_add_all_digests(); - while ((c = getopt(argc, argv, "v")) != -1) switch (c) { case 'v': @@ -72,10 +68,6 @@ main(int argc, char *argv[]) tal_free(tal); } - EVP_cleanup(); - CRYPTO_cleanup_all_ex_data(); - ERR_free_strings(); - if (i < argc) errx(1, "test failed for %s", argv[i]);