diff sencrypt.c @ 16:d9c4bdc004d2

Add support for OpenSSL 1.1
author Guido Berhoerster <guido+sencrypt@berhoerster.name>
date Sat, 07 Jul 2018 14:57:57 +0200
parents 00ca3ee8e310
children 07f525330bc7
line wrap: on
line diff
--- a/sencrypt.c	Sat Jul 07 14:38:31 2018 +0200
+++ b/sencrypt.c	Sat Jul 07 14:57:57 2018 +0200
@@ -525,10 +525,12 @@
 	size_t		pwdata_len = 0;
 	int		status = EXIT_SUCCESS;
 
+#if	OPENSSL_VERSION_NUMBER < 0x10100000L
 	/* initialize OpenSSL */
 	OpenSSL_add_all_algorithms();
 	ERR_load_crypto_strings();
 	OPENSSL_config(NULL);
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
 
 	progname = strrchr(argv[0], '/');
 	progname = (progname != NULL) ? progname + 1 : argv[0];
@@ -809,9 +811,11 @@
 	free(out_filename_tmp);
 	free(tmp_filename);
 
+#if	OPENSSL_VERSION_NUMBER < 0x10100000L
 	EVP_cleanup();
 	ERR_free_strings();
 	CONF_modules_free();
+#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
 
 	exit(status);
 }