diff options
Diffstat (limited to '')
-rw-r--r-- | storage/columnstore/columnstore/tools/passwd/secrets.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/storage/columnstore/columnstore/tools/passwd/secrets.cpp b/storage/columnstore/columnstore/tools/passwd/secrets.cpp index aac32ffa..b6096254 100644 --- a/storage/columnstore/columnstore/tools/passwd/secrets.cpp +++ b/storage/columnstore/columnstore/tools/passwd/secrets.cpp @@ -13,6 +13,7 @@ #include "secrets.h" #include <cctype> +#include <array> #include <fstream> #include <pwd.h> #include <sys/stat.h> @@ -35,12 +36,11 @@ 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 +#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 @@ -96,10 +96,6 @@ void CSPasswdLogging::log(int priority, const char* format, ...) namespace { using HexLookupTable = std::array<uint8_t, 256>; -HexLookupTable init_hex_lookup_table() noexcept; - -// Hex char -> byte val lookup table. -const HexLookupTable hex_lookup_table = init_hex_lookup_table(); /* used in the bin2hex function */ const char hex_upper[] = "0123456789ABCDEF"; @@ -134,6 +130,9 @@ HexLookupTable init_hex_lookup_table() noexcept return rval; } +// Hex char -> byte val lookup table. +const HexLookupTable hex_lookup_table = init_hex_lookup_table(); + bool hex2bin(const char* in, unsigned int in_len, uint8_t* out) { // Input length must be multiple of two. |