You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.5 KiB

  1. From cf39da53236abf02d39c6a98a645488933f3e861 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Tue, 21 Aug 2018 19:29:07 -0700
  4. Subject: [PATCH] ipmitool: Fix compile with deprecated APIs disabled.
  5. From the man page:
  6. EVP_CIPHER_CTX was made opaque in OpenSSL 1.1.0. As a result,
  7. EVP_CIPHER_CTX_reset() appeared and EVP_CIPHER_CTX_cleanup() disappeared.
  8. EVP_CIPHER_CTX_init() remains as an alias for EVP_CIPHER_CTX_reset().
  9. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  10. ---
  11. src/plugins/lanplus/lanplus_crypt_impl.c | 8 ++++++++
  12. 1 file changed, 8 insertions(+)
  13. diff --git a/src/plugins/lanplus/lanplus_crypt_impl.c b/src/plugins/lanplus/lanplus_crypt_impl.c
  14. index 9652a5e..e94401e 100644
  15. --- a/src/plugins/lanplus/lanplus_crypt_impl.c
  16. +++ b/src/plugins/lanplus/lanplus_crypt_impl.c
  17. @@ -183,7 +183,11 @@ lanplus_encrypt_aes_cbc_128(const uint8_t * iv,
  18. lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
  19. return;
  20. }
  21. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  22. EVP_CIPHER_CTX_init(ctx);
  23. +#else
  24. + EVP_CIPHER_CTX_reset(ctx);
  25. +#endif
  26. EVP_EncryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
  27. EVP_CIPHER_CTX_set_padding(ctx, 0);
  28. @@ -262,7 +266,11 @@ lanplus_decrypt_aes_cbc_128(const uint8_t * iv,
  29. lprintf(LOG_DEBUG, "ERROR: EVP_CIPHER_CTX_new() failed");
  30. return;
  31. }
  32. +#if OPENSSL_VERSION_NUMBER < 0x10100000L
  33. EVP_CIPHER_CTX_init(ctx);
  34. +#else
  35. + EVP_CIPHER_CTX_reset(ctx);
  36. +#endif
  37. EVP_DecryptInit_ex(ctx, EVP_aes_128_cbc(), NULL, key, iv);
  38. EVP_CIPHER_CTX_set_padding(ctx, 0);
  39. --
  40. 2.7.4