diff --git a/src/security_default.c b/src/security_default.c index 3ff24cac..c1ad1cfc 100644 --- a/src/security_default.c +++ b/src/security_default.c @@ -935,24 +935,6 @@ static int psk__file_parse(struct mosquitto__unpwd **psk_id, const char *psk_fil } -#ifdef WITH_TLS -static int mosquitto__memcmp_const(const void *a, const void *b, size_t len) -{ - size_t i; - int rc = 0; - - if(!a || !b) return 1; - - for(i=0; iclient->password, u->salt, u->salt_len, hash, &hash_len, u->hashtype, u->iterations); if(rc == MOSQ_ERR_SUCCESS){ - if(hash_len == u->password_len && !mosquitto__memcmp_const(u->password, hash, hash_len)){ + if(hash_len == u->password_len && !pw__memcmp_const(u->password, hash, hash_len)){ return MOSQ_ERR_SUCCESS; }else{ return MOSQ_ERR_AUTH;