diff --git a/src/dht_proxy_server.cpp b/src/dht_proxy_server.cpp
index e45e0a186754aba49d04f847996b21cb2e223fbb..1f9357168475d7d74039e6416517e3c43b121b95 100644
--- a/src/dht_proxy_server.cpp
+++ b/src/dht_proxy_server.cpp
@@ -230,7 +230,9 @@ DhtProxyServer::DhtProxyServer(
         if (ec)
             throw std::runtime_error("Error setting tls context options: " + ec.message());
         // add more security options
+#ifdef SSL_OP_NO_RENEGOTIATION
         SSL_CTX_set_options(tls_context.native_handle(), SSL_OP_NO_RENEGOTIATION); // CVE-2009-3555
+#endif
         // node private key
         auto pk = identity.first->serialize();
         pk_ = std::make_unique<asio::const_buffer>(static_cast<void*>(pk.data()), (std::size_t) pk.size());