#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 "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
31{
33};
#define SECRET_FLAG(key, val)
Definition: SecretMgr.cpp:29
◆ GetHexFromConfig()
59{
61 std::string str =
sConfigMgr->GetOption<std::string>(configKey,
"");
62 if (str.empty())
63 return {};
64
67 {
68 LOG_FATAL(
"server.loading",
"Invalid value for '{}' - specify a hexadecimal integer of up to {} bits with no prefix.", configKey, bits);
70 }
71
73 threshold <<= bits;
74 if (!((
BigNumber(0) <= secret) && (secret < threshold)))
75 {
76 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);
77 secret %= threshold;
78 }
80
81 return secret;
82}
#define sConfigMgr
Definition: Config.h:95
#define ABORT
Definition: Errors.h:76
#define ASSERT
Definition: Errors.h:68
#define LOG_FATAL(filterType__,...)
Definition: Log.h:153
#define LOG_ERROR(filterType__,...)
Definition: Log.h:157
Definition: BigNumber.h:29
bool SetHexStr(char const *str)
Definition: BigNumber.cpp:78
References ABORT, ASSERT, LOG_ERROR, LOG_FATAL, sConfigMgr, and BigNumber::SetHexStr().
Referenced by SecretMgr::AttemptLoad().
◆ secret_info