From: Daniel Frank Date: 2010-01-17T21:40:07+09:00 Subject: Re: GPGME gem - cannot figure out how to decrypt data Am 17.01.2010 13:24, schrieb Daiki Ueno: > Daniel Frank writes: > >> I'm pretty new to ruby and this is my first real program I'm writing. >> Currently I face an issue with the GPGME gem that I cannot figure out >> how to solve: The GPGME::decrypt method does not seem to work as I >> expect it, after reading the documentation. > > First of all, what version of GnuPG are you using? Since GPGME (C > library) uses the gpg command internally, that information would be > helpful to debug. > > Try: > > gpg --version > $ gpg --version gpg (GnuPG) 1.4.10 ... > >> In fact the program seems to hang somewhere during the decryption. My >> guess is that something is wrong with my passphrase callback method, >> but I cannot figure out how this needs to be done, as the examples for >> the gem does not contain a decryption example, only a signing example >> from which I have copied the passphrase callback method, but the >> method does not seem to work, as the callback method seems to be >> called with no arguments. > > Could you provide actual input args to passfunc, that can be inspected > with: > def passfunc(*args) p args puts "Passphrase callback" SMGConfig.instance.gpg_password end Relevant part of the output: decrypting [] Passphrase callback If I interpret this right, [] means that there's an empty array, which means no arguments? Regards, Daniel