The return fs was an typo, priv is being returned. Here is example 
valgrind output from running cryptest.exe b.

==13409== Use of uninitialised value of size 4
==13409==    at 0x8106791: 
CryptoPP::DES::Base::ProcessAndXorBlock(unsigned char const*, unsigned 
char const*, unsigned char*) const (in /usr/bin/cryptest.exe)
==13409==    by 0x80FFACF: 
CryptoPP::BlockTransformation::ProcessAndXorMultipleBlocks(unsigned char 
const*, unsigned char const*, unsigned char*, unsigned) const (in 
/usr/bin/cryptest.exe)
==13409==    by 0x80557FE: BenchMark(char const*, 
CryptoPP::BlockTransformation&, double) (in /usr/bin/cryptest.exe)
==13409==    by 0x8057528: void 
BenchMarkKeyed<CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0, 
CryptoPP::DES::Base> >(char const*, double, CryptoPP::NameValuePairs 
const&, CryptoPP::BlockCipherFinal<(CryptoPP::CipherDir)0, 
CryptoPP::DES::Base>*) (in /usr/bin/cryptest.exe)
==13409==    by 0x8064762: BenchmarkAll(double) (in /usr/bin/cryptest.exe)
==13409==    by 0x80AB1FB: main (in /usr/bin/cryptest.exe)
==13409==

The command used was: valgrind --db-attach=yes cryptest.exe b

Andrew

Wei Dai wrote:
> Try "return priv" instead of "return fs". If you have further problems, 
> please report the acutual error messages that you see.
>
> ----- Original Message ----- 
> From: "Andrew Leung" <[EMAIL PROTECTED]>
> To: "Crypto++ Users" <[EMAIL PROTECTED]>
> Sent: Sunday, March 25, 2007 11:12 AM
> Subject: Crypto++ and valgrind
>
>
>   
>> Hi All,
>>
>> I am debugging my program (which uses cryptopp5.4) and am getting a
>> number of reported errors. Is this a known issue? Or am I simply not
>> using the cryptopp functions properly (i.e. not freeing something I
>> should free?). For example, my ESIGN key generator function looks like:
>>
>> ESIGN<SHA>::Signer makeEsignPrivKey(char* seedpath){
>>    FileSource fs(seedpath, true, new HexDecoder);
>>    ESIGN<SHA>::Signer priv(fs);
>>    return fs;
>> }
>>
>>
>> and the line which generates the 'priv' variable appears to be the
>> source, with the valgrind output first reporting pubkey.h:1481 and
>> eventually ending at secblock.h:103.
>> Thanks for the help!
>>
>> Andrew
>>
>>     
>
>
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to