GPGME signing failed: Bad passphrase

Justus Winter justus at g10code.com
Tue Jul 19 10:24:31 CEST 2016


Hello :)

First of all, your mails are really hard to read because your mua is
inserting   into the plain/text part, and there are no newlines.
This is how it looks to me:

yuriping at sohu.com writes:

> Hi, all,    We're using GPGME now.I encountered one problem When running ./gpgme-1.6.0/tests/run-sign demo, as following:root at YRP-ES-QD:/opt/TestCell# ./run-sign --key 5FEC9A32 filerun-sign: signing failed: Bad passphrase    Does this mean I should use gpg-agent, or I should assign the passphrase somewhere?    By the way, if there is no "gpg" in my system, does the program invoking GPGME work properly?    Thanks for any reply!    Best Regards!

If your key requires a passphrase to be used, then you need to supply it
somehow.  In an interactive setting you may use a pinentry program.  In
fact, that should be the default, and if no pinentry pops up asking you
for the passphrase, it might be that none is installed on your system.
Have you tried

  gpg --sign --local-user 5FEC9A32 file

?

You mention that gpg is not installed.  Is gpg2 available?

In an non-interactive setting, you need to supply the passphrase.  This
can be done using an passphrase callback.  See e.g. tests/gpg/t-sign.c,
and
https://www.gnupg.org/documentation/manuals/gpgme/Passphrase-Callback.html#Passphrase-Callback

Hope that helps :)
Justus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: </pipermail/attachments/20160719/f7844ced/attachment.sig>


More information about the Gnupg-users mailing list