dumpon: update OpenSSL initialization call

ERR_load_crypto_strings() was deprecated in OpenSSL 1.1.0, and explicit
initialization is generally not reqiured.  In the case of dumpon however
we initialize prior to entering capability mode, so replace with an
OPENSSL_init_crypto call.

Reviewed by:	def, Pierre Pronchery
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D40353
This commit is contained in:
Ed Maste 2023-05-31 12:25:58 -04:00
parent 4d78061377
commit 79d4d7133f

View File

@ -566,7 +566,12 @@ main(int argc, char *argv[])
if (cipher != KERNELDUMP_ENC_NONE && pubkeyfile == NULL) {
errx(EX_USAGE, "-C option requires a public key file.");
} else if (pubkeyfile != NULL) {
#if OPENSSL_VERSION_NUMBER < 0x10100000L
ERR_load_crypto_strings();
#else
if (!OPENSSL_init_crypto(0, NULL))
errx(EX_UNAVAILABLE, "Unable to initialize OpenSSL");
#endif
}
#else
if (pubkeyfile != NULL)