From 4480436cb3ce3b57dce9da7ca9bb953384eda440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Thu, 20 Apr 2023 22:40:16 -0400 Subject: [PATCH] securedht: allow certificate to be stored on longId hash --- include/opendht/securedht.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/opendht/securedht.h b/include/opendht/securedht.h index f73e5a1d..19e3d248 100644 --- a/include/opendht/securedht.h +++ b/include/opendht/securedht.h @@ -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; }, -- GitLab