gpgsm: gpg-protect-tool: error while asking for the passphrase: Unknown system error

Bug #640724 reported by Daniel Baumann on 2010-09-16
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
gnupg2 (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: gnupg2

I want to import a pkcs12 certificate.

If I call "gpgsm --import certbundle.p12" this will crash with:
gpgsm: gpgsm: GPG_TTY has not been set - using maybe bogus default
gpgsm: gpg-protect-tool: error while asking for the passphrase: Unknown system error
gpgsm: error running `/usr/lib/gnupg2/gpg-protect-tool': exit status 2
gpgsm: total number processed: 0

Furthermore, this also crashes the running gnome-keyring-daemon.

I've attached a strace output of this command.

I don't know how to work arround this - maybe, someone get a idea...

Daniel Baumann (dnjl) wrote :

ehm, this system is a maverick with all available updates as of 2010-09-16 18:45 UTC

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnupg2 (Ubuntu):
status: New → Confirmed
Alif M. Ahmad (alivema4ever) wrote :

I also experience this bug on Kubuntu 14.04

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty

Here is my kernel information.
$ uname -a
Linux localhost 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Here is output of gpgsm commands
$ gpgsm --call-protect-tool --p12-import mycert.p12
gpg-protect-tool: error while asking for the passphrase: End of file

$ gpgsm --import mycert.p12
gpgsm: gpg-protect-tool: error while asking for the passphrase: End of file
gpgsm: error running `/usr/lib/gnupg2/gpg-protect-tool': exit status 2
gpgsm: total number processed: 0

I've set GPG_TTY before
$ export GPG_TTY=$(tty)

Here is gpgsm version
$ gpgsm --version
gpgsm (GnuPG) 2.0.22
libgcrypt 1.5.3
libksba 1.3.0
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: ~/.gnupg
Supported algorithms:
Cipher: 3DES, AES, AES192, AES256, SERPENT128, SERPENT192, SERPENT256, SEED, CAMELLIA128, CAMELLIA192, CAMELLIA256
Pubkey: RSA, ECDSA
Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224, WHIRLPOOL

tags: added: pinentry-curses pinentry-qt4
Alif M. Ahmad (alivema4ever) wrote :

Here is strace output of command gpgsm --import mycert.p12

Denis Štogl (destogl) wrote :

Workaround (works on Kubuntu 14.04):

unset GPG_AGENT_INFO; gpgsm --import mycert.p12

Got from here: https://bugzilla.redhat.com/show_bug.cgi?id=548528#c28

On Tuesday, August 19, 2014 05:06:17 PM you wrote:
> Workaround (works on Kubuntu 14.04):
>
> unset GPG_AGENT_INFO; gpgsm --import mycert.p12
>
> Got from here:
https://bugzilla.redhat.com/show_bug.cgi?id=548528#c28

Thanks. This temporary workaround is working with pinentry-qt4.
Confirmed on Kubuntu 14.04.1 64bit

Unfortunately, this doesn't work with pinentry-curses, since
pinentry curses could not be brought upfront.

Matthew Carpenter (matt-eisgr) wrote :

Any movement on this? This workaround is great for importing my own cert... but it's a very manual workaround since GPG_AGENT_INFO is important to my environment. All the GUI tools which front-end this don't allow for the workaround, which causes this to break the workflow. Instead of doing things that make sense, this makes me have to focus on all the wrong things.

Thanks for all your hard work!
Matt

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.