On Sun, 2003-11-30 at 19:26, Amerson H Lin wrote:
> I have this method, in doall.cpp
> 
> void RSASignFile(const char *privFilename, const char *messageFilename,
> const char *signatureFilename)
> {
>   AutoSeededRandomPool randPool = AutoSeededRandomPool();
>   unsigned int msgLength=512;
>   SecByteBlock msg(msgLength);
>   InvertibleRSAFunction privKey;
>   
>   FileSource privFile(privFilename, true, new HexDecoder);
> 
>   FileSource msgFile(messageFilename, true);
>   msgFile.Get(msg, msgLength); 
> 
>   RSASSA_PKCS1v15_SHA_Signer priv(privFile);
>   
>   privKey = (InvertibleRSAFunction&)priv.GetPrivateKey();
> 
>   if (privKey.Validate(randPool, 3)){
>     unsigned int sigLength = priv.SignatureLength();
>     printf("private key is acceptable with length of %i \n", sigLength);
>     SecByteBlock sig(sigLength);
>   
>     priv.SignMessage(randPool, msg, msgLength, sig);
> 
>     StringSource(sig, priv.SignatureLength(), true, new HexEncoder(new
> FileSink(cout)));
>    
>   }
> }
> 
> When i call it using crypto++ 5.1 under redhat 9.0, i get the following
> error:
> % Abort
> and the program exits, the program aborts on the line:
> priv.SignMessage(randPool, msg, msgLength, sig).
> 
> please help
> 
> amerson

This is most likely an uncaught exception. Unforunately Crypto++ just
drops an abort and the documentation does not tell you what functions
throw what exceptions. You are going to get the best idea of what went
wrong by building crypto++ with the default build (debug) and your
applications with -g flag. After this run it in gdb and watch what
fails.

Stephen
-- 
Stephen Torri
GPG Key: http://www.cs.wustl.edu/~storri/storri.asc

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to