diff --git a/include/opendht/crypto.h b/include/opendht/crypto.h
index a3c9aa7b40b32de1e1262ac8dba034cc437abc1f..c734b70465ae21f3e76fd51d7a103ebfbf0d16a9 100644
--- a/include/opendht/crypto.h
+++ b/include/opendht/crypto.h
@@ -598,8 +598,8 @@ struct OPENDHT_PUBLIC Certificate {
 private:
     Certificate(const Certificate&) = delete;
     Certificate& operator=(const Certificate&) = delete;
-    InfoHash cachedId_ {};
-    PkId cachedLongId_ {};
+    mutable InfoHash cachedId_ {};
+    mutable PkId cachedLongId_ {};
 
     struct crlNumberCmp {
         bool operator() (const std::shared_ptr<RevocationList>& lhs, const std::shared_ptr<RevocationList>& rhs) const {