ruby-gpgme icon indicating copy to clipboard operation
ruby-gpgme copied to clipboard

encrypting with a certain key raises InvalidValue

Open luto opened this issue 7 years ago • 4 comments

$ ruby test.rb
["[email protected]", "[email protected]"]
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!

luto avatar Apr 04 '18 09:04 luto

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

vtellier avatar Aug 11 '21 16:08 vtellier

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.

luto avatar Aug 11 '21 23:08 luto

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

sachinswaghel avatar Apr 12 '24 03:04 sachinswaghel

@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.

luto avatar Apr 12 '24 09:04 luto