Revert usage of OpenSSL blake2 implementation

This commit is contained in:
Vladimir Dubrovin committed 2026-05-08 16:45:44 +03:00
1 parent 6963af7614
commit 8c638fcaff
7 files changed
+52 -115

No files matched your search

+6 -4
View File
@@ -7,7 +7,7 @@
*/
#include "proxy.h"
#include "blake2_compat.h"
#include "libs/blake2.h"
void initbandlims(struct clientparam *param);
@@ -231,12 +231,14 @@ int strongauth(struct clientparam * param){
if(!strncmp(pass + 1, (char *)param->password, pwl_table.recsize - 1)) return 0;
} else {
blake2b_state S;
unsigned char _b2tmp[64];
unsigned hashsz;
hashsz = pwl_table.recsize - 1 < 64 ? pwl_table.recsize - 1 : 64;
memset(buf, 0, pwl_table.recsize - 1);
blake2b_init_3p(&S, hashsz);
blake2b_update_3p(&S, param->password, pwlen + 1);
blake2b_final_3p(&S, buf, hashsz);
blake2b_init(&S, 64);
blake2b_update(&S, param->password, pwlen + 1);
blake2b_final(&S, _b2tmp, 64);
memcpy(buf, _b2tmp, hashsz);
if(!memcmp(pass + 1, buf, pwl_table.recsize - 1)) return 0;
}
return 6;