projects/sencrypt

changeset 16:d9c4bdc004d2

Add support for OpenSSL 1.1
author Guido Berhoerster <guido+sencrypt@berhoerster.name>
date Sat Jul 07 14:57:57 2018 +0200 (2018-07-07)
parents 00ca3ee8e310
children b7309b030e8d
files sencrypt.c
line diff
     1.1 --- a/sencrypt.c	Sat Jul 07 14:38:31 2018 +0200
     1.2 +++ b/sencrypt.c	Sat Jul 07 14:57:57 2018 +0200
     1.3 @@ -525,10 +525,12 @@
     1.4  	size_t		pwdata_len = 0;
     1.5  	int		status = EXIT_SUCCESS;
     1.6  
     1.7 +#if	OPENSSL_VERSION_NUMBER < 0x10100000L
     1.8  	/* initialize OpenSSL */
     1.9  	OpenSSL_add_all_algorithms();
    1.10  	ERR_load_crypto_strings();
    1.11  	OPENSSL_config(NULL);
    1.12 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
    1.13  
    1.14  	progname = strrchr(argv[0], '/');
    1.15  	progname = (progname != NULL) ? progname + 1 : argv[0];
    1.16 @@ -809,9 +811,11 @@
    1.17  	free(out_filename_tmp);
    1.18  	free(tmp_filename);
    1.19  
    1.20 +#if	OPENSSL_VERSION_NUMBER < 0x10100000L
    1.21  	EVP_cleanup();
    1.22  	ERR_free_strings();
    1.23  	CONF_modules_free();
    1.24 +#endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
    1.25  
    1.26  	exit(status);
    1.27  }