Newbie question - gcry_sexp_build Seg. Fault

António Pinto pinto.antonio at gmail.com
Thu Nov 4 17:21:20 CET 2004


Hello,

I'm getting a seg. fault while running the following code:

------------------------
int buildSig(int msgid, int leaderid, char * sig) {
gcry_sexp_t plain, sign;
int len,data;
	
	data=msgid+leaderid;
	gcry_sexp_build (&plain, NULL, "(data (flags raw) (value %d))",
&data); /* SEG FAULT */
	gcry_pk_sign(&sign, plain, sKey);
	len=gcry_sexp_sprint(sign, GCRYSEXP_FMT_ADVANCED, sig, sizeof(char)*1024);

return len;
}
------------------------

Can anyone tell me what am I doing wrong? I'm running libgcrypt 1.2.0
on a Fedora Core 2 Intel PC.

thx

-- 
António Pinto



More information about the Gcrypt-devel mailing list