mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-02-06 11:12:09 +08:00
Revert high CPU password hashing until separate threads are used
This commit is contained in:
@@ -99,7 +99,8 @@ endif()
|
||||
find_package(cJSON REQUIRED)
|
||||
find_package(argon2)
|
||||
if(ARGON2_FOUND)
|
||||
add_definitions("-DWITH_ARGON2")
|
||||
# Disable until separate password handling thread is implemented
|
||||
#add_definitions("-DWITH_ARGON2")
|
||||
endif()
|
||||
|
||||
option(WITH_LTO "Build with link time optimizations (IPO) / interprocedural optimization (IPO) enabled." ON)
|
||||
|
||||
@@ -146,9 +146,6 @@ WITH_SQLITE=yes
|
||||
# currently only suitable for use with oss-fuzz.
|
||||
WITH_FUZZING=no
|
||||
|
||||
# Build with argon2id support for password hashing.
|
||||
WITH_ARGON2=yes
|
||||
|
||||
# Build using clang and with address sanitiser enabled
|
||||
WITH_ASAN=no
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ Contributors:
|
||||
# define MOSQ_ARGON2_P 1
|
||||
#endif
|
||||
|
||||
#define PW_DEFAULT_ITERATIONS 210000
|
||||
#define PW_DEFAULT_ITERATIONS 1000
|
||||
static int pw__encode(struct mosquitto_pw *pw);
|
||||
|
||||
struct mosquitto_pw{
|
||||
@@ -530,10 +530,10 @@ int mosquitto_pw_hash_encoded(struct mosquitto_pw *pw, const char *password)
|
||||
int rc = MOSQ_ERR_INVAL;
|
||||
|
||||
switch(pw->hashtype){
|
||||
case MOSQ_PW_DEFAULT:
|
||||
case MOSQ_PW_ARGON2ID:
|
||||
rc = pw__create_argon2id(pw, password);
|
||||
break;
|
||||
case MOSQ_PW_DEFAULT:
|
||||
case MOSQ_PW_SHA512_PBKDF2:
|
||||
rc = pw__create_sha512_pbkdf2(pw, password);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user