ueno / ruby-gpgme

a ruby interface to GnuPG Made Easy (GPGME).
GNU Lesser General Public License v2.1
232 stars 99 forks source link

clearsign produces detached signatures #189

Open PomposusMaximus opened 4 months ago

PomposusMaximus commented 4 months ago

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

PomposusMaximus commented 4 months ago

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.