gpgme: is there a way to identify a signature as clear text or detached?
wk at gnupg.org
Tue Sep 24 09:18:05 CEST 2013
On Mon, 23 Sep 2013 19:40, lunar at debian.org said:
> Is there an easy way to give GPGME the file and know if it is a
> clear text signature or a detached signature?
No. You may simply try to verify and only in the case of an error
assume a detached signature and ask for the data file.
The new gpgme_data_identify does not distinguish between a detached and
a cleartext signature either.
> Another related question: in my tests, using the following always
> 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
You usually need this to present the signed text. Without passing it
through gpg you would need to do the un-escaping yourself. Feel free to
add a feature request in the bug tracker.
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
More information about the Gnupg-users