I have a dll file which creates RSA signatures based on
presonal information to create a license file.  This was
working fine until I migrated from cryptoPP5.0 to 5.1.

The signing code (below) is unchanged

unsigned long RSASignFile(const char *szPrivFilename, byte
*bMessage, byte *bSignature)
{

   FileSource privFile(szPrivFilename, true, new
HexDecoder);
   RSASSA_PKCS1v15_SHA_Signer privSigner(privFile);
   RandomPool rng;
   StringSource pipeline((char *)bMessage, true,
           new SignerFilter(rng, privSigner,
           new HexEncoder(
           new ArraySink(bSignature,
2*privSigner.SignatureLength()))));
   return 2*privSigner.SignatureLength();
}

However compiling the project now produces the following
error.

C:\Program Files\Microsoft Visual
Studio\VC98\INCLUDE\cryptopp/misc.h(50) : error C2079:
'm_object' uses undefined class 'SHA'
        C:\Program Files\Microsoft Visual
Studio\VC98\INCLUDE\cryptopp/pubkey.h(289) : see reference
to class template instantiation
'CryptoPP::ObjectHolder<class CryptoPP::SHA>' being compiled
        C:\Program Files\Microsoft Visual
Studio\VC98\INCLUDE\cryptopp/pubkey.h(479) : see reference
to class template instantiation
'CryptoPP::PK_MessageAccumulatorImpl<class CryptoPP::SHA>'
being compiled
        C:\Program Files\Microsoft Visual
Studio\VC98\INCLUDE\cryptopp/pubkey.h(478) : while compiling
class-template member function 'class
CryptoPP::PK_MessageAccumulator *__thiscall
CryptoPP::TF_SignerImpl<struct
CryptoPP::TF_SignatureSchemeOptio
ns<class CryptoPP::TF_SS<struct CryptoPP::PKCS1v15,class
CryptoPP::SHA,struct CryptoPP::RSA,int>,struct
CryptoPP::RSA,class
CryptoPP::PKCS1v15_SignatureMessageEncodingMethod,class
CryptoPP::SHA> >::NewSignatureAccumulator(class
CryptoPP::RandomNumbe
rGenerator &) const'
Error executing cl.exe.

Anyone encountered this before or know what the problem is?

Iain

Reply via email to