From 86ccf4c0083c25ed4af48866cea14a6eb1e22a6c Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Thu, 14 Jul 2016 02:05:13 -0400 Subject: [PATCH] Added virtual destruction as first class method guarded on CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562. Updated documentation. --- fhmqv.h | 4 ++++ hmqv.h | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/fhmqv.h b/fhmqv.h index 5d2f5135..8e709f45 100644 --- a/fhmqv.h +++ b/fhmqv.h @@ -25,6 +25,10 @@ public: typedef typename GroupParameters::Element Element; typedef FHMQV_Domain Domain; +#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 + virtual ~FHMQV_Domain() {} +#endif + FHMQV_Domain(bool clientRole = true): m_role(clientRole ? RoleClient : RoleServer) {} FHMQV_Domain(const GroupParameters ¶ms, bool clientRole = true) diff --git a/hmqv.h b/hmqv.h index e44e0a24..b9727e58 100644 --- a/hmqv.h +++ b/hmqv.h @@ -24,6 +24,10 @@ public: typedef typename GroupParameters::Element Element; typedef HMQV_Domain Domain; +#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562 + virtual ~HMQV_Domain() {} +#endif + HMQV_Domain(bool clientRole = true): m_role(clientRole ? RoleClient : RoleServer) {} HMQV_Domain(const GroupParameters ¶ms, bool clientRole = true) @@ -294,7 +298,7 @@ private: //! \brief Hashed Menezes-Qu-Vanstone in GF(p) //! \details This implementation follows Hugo Krawczyk's HMQV: A High-Performance //! Secure Diffie-Hellman Protocol. Note: this implements HMQV only. HMQV-C with Key Confirmation is not provided. -typedef HMQV_Domain HashedMQV; +typedef HMQV_Domain HMQV_GFP; NAMESPACE_END