-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with set_passphrase_cb #11
Comments
Since gnupg2 does all the crypt stuff in gpg-agent, you cannot intercept the passphrase handling. |
It may be helpful to mention that this feature is GPG1 compatible only in the documentation of http://rdoc.info/github/ueno/ruby-gpgme/GPGME/Ctx#set_passphrase_callback-instance_method so that people don't waste their time trying to get it to work. I just happened to stumble upon this issue report and now understand why my code wasn't working for 2 days. |
@joekiller thanks, done |
I need to be able to implement gpgme from a systems tool and pass the key password as a string. However, using the password attribute to
Ctx.new
does not accomplish this. This is the code I'm using...I've walked through the Ruby side of things and it looks like set_passphrase_callback is called correctly with passfunc set to
#<Method: GPGME::Ctx.pass_function>
and hook_value being the value of my password but the pass_function never gets called. GPGME seems to want to use gpg-agent. Without gpg-agent running I get prompted by GPG for a password, which then works. If I run gpg-agent then it works seamlessly no matter what value I put into :password above.The problem seems to be on the C side rather than the ruby side, but have you seen this behaviour before? This is gnupg2-2.0.14-4, gpgme-1.1.8-3 with the 2.0.1 gpgme gem on CentOS
A few other notes...
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: