gpgme: is there a way to identify a signature as clear text or detached?

Jérémy Bobbio lunar at debian.org
Mon Sep 23 19:40:59 CEST 2013


Hi!

While having a look at a missing feature in seahorse-nautilus [1], I did
not find a way to use GPGME to figure out if a signature was a clear
text signature or a detached signature.

The idea for seahorse-nautilus is to allow users to right click on a
`.asc` file and select “Verify signature…”. Ideally, if the file
contains a clear text signature, it would proceed to verify the
signature immediately. When having a detached signature, it would
eventually prompt the user about the location of the signed material.

Is there an easy way to give GPGME the file and know if it is a
clear text signature or a detached signature?


Another related question: in my tests, using the following always
failed:

    err = gpgme_op_verify(ctx, sig, NULL, NULL);

It seems that the `plain` 4th argument is mandatory when verifying
cleartext signature. I don't understand the rationale for that. In
seahorse-nautilus use case, we are only interested in the validity of
the signature.

Thanks for your help!

[1] https://bugzilla.gnome.org/show_bug.cgi?id=551042

-- 
Lunar                                .''`. 
lunar at debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: </pipermail/attachments/20130923/e6f5ea5f/attachment.sig>


More information about the Gnupg-users mailing list