securedht: allow certificate to be stored on longId hash

This commit is contained in:
Adrien Béraud committed 2023-04-20 22:41:38 -04:00
1 parent d4114830be
commit 4480436cb3
1 file changed
+1 -1
+1 -1
View File
@@ -378,7 +378,7 @@ const ValueType CERTIFICATE_TYPE = {
try {
crypto::Certificate crt(v->data);
// TODO check certificate signature
return crt.getPublicKey().getId() == id;
return crt.getPublicKey().getId() == id || InfoHash::get(crt.getPublicKey().getLongId()) == id;
} catch (const std::exception& e) {}
return false;
},