Thanks for reporting this. I've attached a patch with the fix.
----- Original Message -----
From: "Cedric Templie" <[EMAIL PROTECTED]>
To: "Crypto++ Users" <[EMAIL PROTECTED]>
Sent: Thursday, March 01, 2007 2:43 AM
Subject: DH2
>
> Hello,
>
> I tried to use the DH2 from cryptopp library ( version 5.2.1 ) and
> unfortunately got a compilation issue ( I use msvc.net 2003 ):
>
> : error C2259: 'CryptoPP::DH2' : cannot instantiate abstract class
> due to following members:
> 'CryptoPP::CryptoParameters
> &CryptoPP::KeyAgreementAlgorithm::AccessCryptoParameters(void)' : pure
> virtual function was not defined
>
> I saw that effectively the method "AccessCryptoParameters" is not
> implemented in DH2 class.
>
> I do not know if DH2 class is expected to be inherited, and then sub-
> class must implement the method. Or if this is something that was
> omitted in the class.
>
> Anyway, I have no idea about the way the method must be implemented.
> I am looking for a hint to implement the method.
>
> Thanks in advance.
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users"
Google Group.
To unsubscribe, send an email to [EMAIL PROTECTED]
More information about Crypto++ and this group is available at
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---
Index: dh2.h
===================================================================
RCS file: /cvsroot/cryptopp/c5/dh2.h,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 dh2.h
*** dh2.h 4 Oct 2002 17:31:44 -0000 1.1.1.1
--- dh2.h 3 Mar 2007 22:35:55 -0000
***************
*** 12,22 ****
class DH2 : public AuthenticatedKeyAgreementDomain
{
public:
! DH2(const SimpleKeyAgreementDomain &domain)
: d1(domain), d2(domain) {}
! DH2(const SimpleKeyAgreementDomain &staticDomain, const
SimpleKeyAgreementDomain &ephemeralDomain)
: d1(staticDomain), d2(ephemeralDomain) {}
unsigned int AgreedValueLength() const
{return d1.AgreedValueLength() + d2.AgreedValueLength();}
--- 12,24 ----
class DH2 : public AuthenticatedKeyAgreementDomain
{
public:
! DH2(SimpleKeyAgreementDomain &domain)
: d1(domain), d2(domain) {}
! DH2(SimpleKeyAgreementDomain &staticDomain, SimpleKeyAgreementDomain
&ephemeralDomain)
: d1(staticDomain), d2(ephemeralDomain) {}
+ CryptoParameters & AccessCryptoParameters() {return
d1.AccessCryptoParameters();}
+
unsigned int AgreedValueLength() const
{return d1.AgreedValueLength() + d2.AgreedValueLength();}
***************
*** 48,54 ****
bool validateStaticOtherPublicKey=true) const;
protected:
! const SimpleKeyAgreementDomain &d1, &d2;
};
NAMESPACE_END
--- 50,56 ----
bool validateStaticOtherPublicKey=true) const;
protected:
! SimpleKeyAgreementDomain &d1, &d2;
};
NAMESPACE_END