From 04fa95b621e5c217f982a5593bf4f6695d6ce956 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 18 Jun 2023 14:43:06 +0200 Subject: Adding upstream version 2.1.2. Signed-off-by: Daniel Baumann --- plugins/anonaes128/anonaes128.c | 9 ++++++++- plugins/cryptopan/cryptopan.c | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/anonaes128/anonaes128.c b/plugins/anonaes128/anonaes128.c index 56c8656..b2d8dbd 100644 --- a/plugins/anonaes128/anonaes128.c +++ b/plugins/anonaes128/anonaes128.c @@ -198,7 +198,14 @@ void anonaes128_getopt(int* argc, char** argv[]) } if (!EVP_CipherInit_ex(ctx, EVP_aes_128_ecb(), NULL, key, iv, decrypt ? 0 : 1)) { unsigned long e = ERR_get_error(); - fprintf(stderr, "%s:%s:%s", ERR_lib_error_string(e), ERR_func_error_string(e), ERR_reason_error_string(e)); + fprintf(stderr, "%s:%s:%s\n", + ERR_lib_error_string(e), +#if OPENSSL_VERSION_NUMBER < 0x30000000L + ERR_func_error_string(e), +#else + "", +#endif + ERR_reason_error_string(e)); usage("unable to initialize AES128 cipher"); } EVP_CIPHER_CTX_set_padding(ctx, 0); diff --git a/plugins/cryptopan/cryptopan.c b/plugins/cryptopan/cryptopan.c index 14f185f..5eb54c7 100644 --- a/plugins/cryptopan/cryptopan.c +++ b/plugins/cryptopan/cryptopan.c @@ -228,7 +228,14 @@ void cryptopan_getopt(int* argc, char** argv[]) } if (!EVP_CipherInit_ex(ctx, EVP_aes_128_ecb(), NULL, key, iv, 1)) { unsigned long e = ERR_get_error(); - fprintf(stderr, "%s:%s:%s\n", ERR_lib_error_string(e), ERR_func_error_string(e), ERR_reason_error_string(e)); + fprintf(stderr, "%s:%s:%s\n", + ERR_lib_error_string(e), +#if OPENSSL_VERSION_NUMBER < 0x30000000L + ERR_func_error_string(e), +#else + "", +#endif + ERR_reason_error_string(e)); usage("unable to initialize AES128 cipher"); } EVP_CIPHER_CTX_set_padding(ctx, 0); -- cgit v1.2.3