1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-07 03:22:57 +03:00

OpenSSL 3 support for Columnstore

This commit is contained in:
Leonid Fedorov
2022-02-17 14:22:49 +00:00
parent 44d326ef93
commit 78a071673f
4 changed files with 25 additions and 4 deletions

View File

@@ -21,6 +21,7 @@
#include <openssl/evp.h>
#include <openssl/ossl_typ.h>
#include <openssl/rand.h>
#include <openssl/opensslv.h>
#define BOOST_SPIRIT_THREADSAFE
#include <boost/property_tree/ptree.hpp>
@@ -34,6 +35,15 @@
using std::string;
#ifdef OPENSSL_VERSION_PREREQ
#if OPENSSL_VERSION_PREREQ(3,0)
#define EVP_CIPHER_key_length EVP_CIPHER_get_key_length
#define EVP_CIPHER_iv_length EVP_CIPHER_get_iv_length
#define EVP_CIPHER_blocksize EVP_CIPHER_get_blocksize
#endif
#endif
const char* const SECRETS_FILENAME = ".secrets";
namespace
@@ -469,6 +479,8 @@ string decrypt_password(const string& input)
* @param input Encrypted password in hex form
* @return Decrypted password or empty on error
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
string decrypt_password_old(const ByteVec& key, const ByteVec& iv, const std::string& input)
{
string rval;
@@ -501,6 +513,7 @@ string decrypt_password_old(const ByteVec& key, const ByteVec& iv, const std::st
}
return rval;
}
#pragma GCC diagnostic pop
string decrypt_password(const ByteVec& key, const std::string& input)
{