diff --git a/contrib/src/opendht/SHA512SUMS b/contrib/src/opendht/SHA512SUMS
index 23b5249ed53d09a9fd0c4e6b66d455327cf54cbd..73c65b04c267135388ae9d39730b6e1d833af312 100644
--- a/contrib/src/opendht/SHA512SUMS
+++ b/contrib/src/opendht/SHA512SUMS
@@ -1 +1 @@
-9bbef0a9ccf87af8f20439c4cc3654ba34f985d3f09a378085e7fcfa4d6571c1545f733550d85ebbac0e6b367b4ffaf26b7c93da5e7d7a9707cef9851b916893  opendht-1ac4e08f455146f1e22478452e503dcb35688cc7.tar.gz
+2e78132097e839cace59fa9d926621854107af2486cee55d76f24176b3f3c86be99d1e388bbb604cde8f2490f4e9cc3e7dc9ccfc868f951e3dac1e6ba8a25a72  opendht-ef82652a1e9417cd20df3bf55f569aee26b6e6a8.tar.gz
diff --git a/contrib/src/opendht/fetch_and_patch.bat b/contrib/src/opendht/fetch_and_patch.bat
index d7604af246e71a1655dfb8d100af3f09ec02f25a..163ff2947b161453ae7d70c3d1722eb8bb69ccea 100644
--- a/contrib/src/opendht/fetch_and_patch.bat
+++ b/contrib/src/opendht/fetch_and_patch.bat
@@ -1,6 +1,6 @@
 set BUILD=%SRC%..\build
 
-set OPENDHT_VERSION=d523e9f259aa2e90e0c56b7f66324422422c9e2b
+set OPENDHT_VERSION=ef82652a1e9417cd20df3bf55f569aee26b6e6a8
 set OPENDHT_URL=https://github.com/savoirfairelinux/opendht/archive/%OPENDHT_VERSION%.tar.gz
 
 mkdir %BUILD%
diff --git a/contrib/src/opendht/rules.mak b/contrib/src/opendht/rules.mak
index 69e9e5184ef14b0159b5c472d519abcbb02082f8..aa865619d6b3ad4ac1b854dcb1ff936645e6f666 100644
--- a/contrib/src/opendht/rules.mak
+++ b/contrib/src/opendht/rules.mak
@@ -1,5 +1,5 @@
 # OPENDHT
-OPENDHT_VERSION := 1ac4e08f455146f1e22478452e503dcb35688cc7
+OPENDHT_VERSION := ef82652a1e9417cd20df3bf55f569aee26b6e6a8
 OPENDHT_URL := https://github.com/savoirfairelinux/opendht/archive/$(OPENDHT_VERSION).tar.gz
 
 PKGS += opendht
diff --git a/src/security/certstore.cpp b/src/security/certstore.cpp
index eda44bc07a6273480cb99ca0d4125331c07435dc..291e6afd2aae8876b213ced3fd4b4cc4a75ef537 100644
--- a/src/security/certstore.cpp
+++ b/src/security/certstore.cpp
@@ -118,13 +118,13 @@ CertificateStore::getCertificate(const std::string& k) const
 }
 
 std::shared_ptr<crypto::Certificate>
-CertificateStore::findCertificateByName(const std::string& name, crypto::Certificate::NameType type) const
+CertificateStore::findCertificateByName(const std::string& name, crypto::NameType type) const
 {
     std::unique_lock<std::mutex> l(lock_);
     for (auto& i : certs_) {
         if (i.second->getName() == name)
             return i.second;
-        if (type != crypto::Certificate::NameType::UNKNOWN) {
+        if (type != crypto::NameType::UNKNOWN) {
             for (const auto& alt : i.second->getAltNames())
                 if (alt.first == type and alt.second == name)
                     return i.second;
diff --git a/src/security/certstore.h b/src/security/certstore.h
index c4442b7cdac9fc0fb59e2a863b5853384a796871..0981efab946e9abf4c1d6569bf381fd2b84eba21 100644
--- a/src/security/certstore.h
+++ b/src/security/certstore.h
@@ -57,7 +57,7 @@ public:
     std::vector<std::string> getPinnedCertificates() const;
     std::shared_ptr<crypto::Certificate> getCertificate(const std::string& cert_id) const;
 
-    std::shared_ptr<crypto::Certificate> findCertificateByName(const std::string& name, crypto::Certificate::NameType type = crypto::Certificate::NameType::UNKNOWN) const;
+    std::shared_ptr<crypto::Certificate> findCertificateByName(const std::string& name, crypto::NameType type = crypto::NameType::UNKNOWN) const;
     std::shared_ptr<crypto::Certificate> findCertificateByUID(const std::string& uid) const;
     std::shared_ptr<crypto::Certificate> findIssuer(const std::shared_ptr<crypto::Certificate>& crt) const;