mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-09-26 20:33:50 +08:00
Fix build for WITH_TLS=no WITH_ARGON2=yes WITH_ASAN=yes
This commit is contained in:
@@ -104,9 +104,10 @@ static int pw__create_argon2id(struct mosquitto_pw *pw, const char *password)
|
||||
#ifdef WITH_ARGON2
|
||||
pw->hashtype = MOSQ_PW_ARGON2ID;
|
||||
pw->params.argon2id.salt_len = HASH_LEN;
|
||||
int rc = RAND_bytes(pw->params.argon2id.salt, (int)pw->params.argon2id.salt_len);
|
||||
if(!rc){
|
||||
return MOSQ_ERR_UNKNOWN;
|
||||
|
||||
int rc = mosquitto_getrandom(pw->params.argon2id.salt, (int)pw->params.argon2id.salt_len);
|
||||
if(rc){
|
||||
return rc;
|
||||
}
|
||||
|
||||
size_t encoded_len = argon2_encodedlen(MOSQ_ARGON2_T, MOSQ_ARGON2_M, MOSQ_ARGON2_P,
|
||||
|
||||
Reference in New Issue
Block a user