Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: GnuPG: devel

gpgme_set_passphrase_cb seems to be ignored

 

 

GnuPG devel RSS feed   Index | Next | Previous | View Threaded


admin at garyshood

Mar 21, 2009, 12:24 AM

Post #1 of 3 (812 views)
Permalink
gpgme_set_passphrase_cb seems to be ignored

When I set a passphrase callback, it doesn't seem to be used, and
pinentry runs instead.

gpgme_set_passphrase_cb(ctx, return_pass, NULL);

The application compiles fine, and the function return_pass is setup
correctly, but pinentry runs no matter what I change. Is there a way
to force this callback?

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


wk at gnupg

Apr 16, 2009, 1:08 AM

Post #2 of 3 (717 views)
Permalink
Re: gpgme_set_passphrase_cb seems to be ignored [In reply to]

On Sat, 21 Mar 2009 08:24, admin [at] garyshood said:

> When I set a passphrase callback, it doesn't seem to be used, and
> pinentry runs instead.

That's intended. GnuPG2 requires the gpg-agent for secret key
operations and does not bother the application with passphrases etc.

There are ways to workaround it by using a custom pinentry script
controlled by envvar PINENTRY_USER_DATA or by using
gpg-preset-passphrase.



Shalom-Salam,

Werner

--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel


marcus.brinkmann at ruhr-uni-bochum

Apr 18, 2009, 5:15 AM

Post #3 of 3 (709 views)
Permalink
Re: gpgme_set_passphrase_cb seems to be ignored [In reply to]

Gary Suggett wrote:
> When I set a passphrase callback, it doesn't seem to be used, and
> pinentry runs instead.

That's the correct behaviour with gpg2.

> The application compiles fine, and the function return_pass is setup
> correctly, but pinentry runs no matter what I change. Is there a way
> to force this callback?

This is half-a-lie, but the short answer is no, there isn't. The application
is not allowed to insert itself into the trusted path.

Think about it: If your program would work with a smart card terminal, you
also wouldn't get access to the PIN inquiry.

I suspect that your actual question is how to do unattended
decryption/signing. This has many answers depending on circumstances (using
no passphrase at all, presetting the password in the agent and caching it
there, writing a custom pinentry, disabling pinentry in an custom
configuration, etc).

Thanks,
Marcus




_______________________________________________
Gnupg-devel mailing list
Gnupg-devel [at] gnupg
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

GnuPG devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.