ueno/ruby-gpgme

clearsign produces detached signatures

Opened this issue · 1 comments

Good morning

is it by intention that GPGME::Crypto.clearsign(text) produces detached signatures? At least, the signed data is not included in the result. Should this not be an equivalent to calling :~$: gpg --clearsign [text] on the command-line?
Directing the output to a file (option :output) does only produce the same, for me useless, output: a signature inside a PGP-encrypted block, but the signed data is not included.

If you do produce “inline” clear singed text, please show me your authentic code example.

TIA

It appears, that also
sig2 = crypto.sign(text, :mode => GPGME::SIG_MODE_CLEAR)
does not produce an inline-signature. Like with clearsign(), the signed content is missing.

Meanwhile
GPGME::Ctx.new {|ctx| ctx.sign(text, output, GPGME::SIG_MODE_CLEAR)}
works alright.

The problem – if I understand anything at all – is with GPGME::Crypto, irrespective of the signing method.