#include "SecretMgr.h"
#include "AES.h"
#include "Argon2.h"
#include "Config.h"
#include "CryptoGenerics.h"
#include "DatabaseEnv.h"
#include "Errors.h"
#include "Log.h"
#include "QueryResult.h"
#include "SharedDefines.h"
Go to the source code of this file.
◆ SECRET_FLAG
◆ SECRET_FLAG_FOR
#define SECRET_FLAG_FOR |
( |
|
key, |
|
|
|
val, |
|
|
|
server |
|
) |
| server ## _ ## key = (val ## ull << (16*SERVER_PROCESS_ ## server)) |
◆ SecretFlags
32{
34};
#define SECRET_FLAG(key, val)
Definition: SecretMgr.cpp:30
◆ GetHexFromConfig()
60{
62 std::string str =
sConfigMgr->GetOption<std::string>(configKey,
"");
63 if (str.empty())
64 return {};
65
68 {
69 LOG_FATAL(
"server.loading",
"Invalid value for '{}' - specify a hexadecimal integer of up to {} bits with no prefix.", configKey, bits);
71 }
72
74 threshold <<= bits;
75 if (!((
BigNumber(0) <= secret) && (secret < threshold)))
76 {
77 LOG_ERROR(
"server.loading",
"Value for '{}' is out of bounds (should be an integer of up to {} bits with no prefix). Truncated to {} bits.", configKey, bits, bits);
78 secret %= threshold;
79 }
81
82 return secret;
83}
#define LOG_FATAL(filterType__,...)
Definition: Log.h:152
#define LOG_ERROR(filterType__,...)
Definition: Log.h:156
#define sConfigMgr
Definition: Config.h:74
#define ABORT
Definition: Errors.h:76
#define ASSERT
Definition: Errors.h:68
Definition: BigNumber.h:29
bool SetHexStr(char const *str)
Definition: BigNumber.cpp:65
References ABORT, ASSERT, LOG_ERROR, LOG_FATAL, sConfigMgr, and BigNumber::SetHexStr().
Referenced by SecretMgr::AttemptLoad().
◆ secret_info