[GPGME] Verify ASCII armor signature fails

Timo Schulz twoaday at freakmail.de
Sun Dec 15 20:19:02 CET 2002


On Thu Dec 12 2002; 23:58, Laurent Cheylus wrote:


>     err = gpgme_data_new_from_mem (&txt,text,strlen(text),1);
>     fail_if_err (err);
>     err = gpgme_data_new_from_mem (&sig,sign,strlen(sign),1);
>     fail_if_err (err);
> 
>     err = gpgme_op_verify (ctx,sig,txt,&status);

You only need one data struct to verify cleartext signatures. GPGME
knows how to handle it.

Here is an example from WinPT:

    if( !err )
        err = gpgme_data_new_from_clipboard( &sig, 1 );
    if( !err )
        err = gpgme_op_verify( c, sig, NULL, &ctx->sigstat );


        Timo




More information about the Gnupg-devel mailing list