gpgme_op_verify behaves weird
alf at bordel-ambiant.org
Wed Sep 6 11:13:58 CEST 2006
I'v solved my problem and it was because of Qt ...
(message is a QString)
int message_length = message.toAscii().size() ;
char * message_char = (char *) calloc(message_length+1,sizeof(char)) ;
result = gpgme_data_new_from_mem(&msg,message_char,message_length,0) ;
Seems to have a lack of \0 or too many, I don't known, when I put directly a
hard coded string it works and from a QString I need to really care with
initializing all bytes with \0 (with the calloc). A
memcpy(qstring_str.toAscii(),hardcoded_string,length+1) returns 0.
Good luck for those who use Qt (C++) and C api ...
Thanks to all
Le Mercredi 6 Septembre 2006 10:59, Werner Koch a écrit :
> On Tue, 5 Sep 2006 15:36, Marcus Brinkmann said:
> > see if they verify on the command line. You may also want to try
> > running with environment variable GPGME_DEBUG=3, to see the
> > communication between GPGME and GPG.
> Another option is to put "debug 512" into gpg.conf. This will create
> files with the actual hashed content. Compare what you signed and
> what you verified.
More information about the Gnupg-devel