diff --git a/contrib/src/opendht/rules.mak b/contrib/src/opendht/rules.mak
index cad86cb84ef436e23057141d445e344cfcf5a978..1204319153537bf5510cb24161c8a0bf3eb5aa5d 100644
--- a/contrib/src/opendht/rules.mak
+++ b/contrib/src/opendht/rules.mak
@@ -14,7 +14,7 @@ endif
 ifneq ($(call need_pkg,"libargon2"),)
 DEPS_opendht += argon2
 endif
-ifneq ($(call need_pkg,"libressl >= 1-12-2"),)
+ifneq ($(and $(call need_pkg,"openssl >= 1.1.0"),$(call need_pkg,"libressl >= 1.12.2")),)
 DEPS_opendht += libressl
 endif
 ifneq ($(call need_pkg,"restinio >= v.0.5.1"),)