ueno / ruby-gpgme

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

encrypting with a certain key raises InvalidValue #114

Open luto opened 6 years ago

luto commented 6 years ago
$ ruby test.rb
["luto@keybase.io", "m@luto.at"]
Traceback (most recent call last):
    5: from test.rb:88:in `<main>'
    4: from test.rb:12:in `doit'
    3: from /home/luto/.gem/ruby/2.5.0/gems/gpgme-2.0.16/lib/gpgme/crypto.rb:90:in `encrypt'
    2: from /home/luto/.gem/ruby/2.5.0/gems/gpgme-2.0.16/lib/gpgme/ctx.rb:79:in `new'
    1: from /home/luto/.gem/ruby/2.5.0/gems/gpgme-2.0.16/lib/gpgme/crypto.rb:99:in `block in encrypt'
/home/luto/.gem/ruby/2.5.0/gems/gpgme-2.0.16/lib/gpgme/ctx.rb:488:in `encrypt': Invalid value (GPGME::Error::InvalidValue)

https://gist.github.com/luto/1d60390d21e68a8adf0dd7b3f2900f68

Using my public key to encrypt a simple string causes gpgme to raise an InvalidValue error. It works fine using the key of my employer. Using my key also works fine on the gpg command line and I am able to receive and decrypt mail with it.

Sadly I am kind of lost on how to debug this.. any tips? Thank you very much!

vtellier commented 3 years ago

Hello @luto, Did you find any workaround this issue? I'm facing the same case. Thanks!

luto commented 3 years ago

Hi Vincent! No, sorry. I abandoned the project because of the lack of GPG support in ruby at the time. Best of luck! I hope things have improved.

sachinswaghel commented 7 months ago

Me too facing same issue on versions 2.0.23 and 2.0.24 @luto , @vtellier @benburkert @ariejan @zed-0xff Any updates?

luto commented 7 months ago

@sachinswaghel don't mention random people on github. Just post in the issue, people who are watching will be notified even if you don't mention them.