Bug 704495
Summary: | gpg-agent does not support utf-8 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Tomasz Kepczynski <tomek> | ||||||
Component: | pinentry | Assignee: | Boris Ranto <branto> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Martin Žember <mzember> | ||||||
Severity: | unspecified | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 6.0 | CC: | branto, ebenes, ksrot, mzember, ovasik, syeghiay, tmraz, tomasz.kepczynski | ||||||
Target Milestone: | rc | ||||||||
Target Release: | --- | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | pinentry-0.7.6-8.el6 | Doc Type: | Bug Fix | ||||||
Doc Text: |
Cause: The pinentry-curses binary lacked UTF-8 support in some places.
Consequence: The output of description text in pinentry getpin command got scrambled.
Fix: Do a proper utf-8 translation and compile pinentry against ncursesw that contains the wide char support necessary to fix this.
Result: The description field in getpin command is outputted correctly.
|
Story Points: | --- | ||||||
Clone Of: | |||||||||
: | 724972 (view as bug list) | Environment: | |||||||
Last Closed: | 2015-03-30 08:09:22 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
I do not think this is a bug in the gnupg2. I suppose there is non-utf8 locale set in the gnupg2 agent environment. Can you call 'unset GPG_AGENT_INFO' before runing the gpg2 command and test it again? I don't think this is a reason: triss:~> set | grep GPG triss:~> But to make sure I am not missing anything, I tried: triss:~> unset GPG_AGENT_INFO triss:~> gpg -d ~/pliki/txt/dane.txt.asc with exactly the same problem as in the screenshot. And locale for completness: triss:~> locale LANG=pl_PL.UTF-8 LC_CTYPE="pl_PL.UTF-8" LC_NUMERIC="pl_PL.UTF-8" LC_TIME="pl_PL.UTF-8" LC_COLLATE="pl_PL.UTF-8" LC_MONETARY="pl_PL.UTF-8" LC_MESSAGES="pl_PL.UTF-8" LC_PAPER="pl_PL.UTF-8" LC_NAME="pl_PL.UTF-8" LC_ADDRESS="pl_PL.UTF-8" LC_TELEPHONE="pl_PL.UTF-8" LC_MEASUREMENT="pl_PL.UTF-8" LC_IDENTIFICATION="pl_PL.UTF-8" LC_ALL= Now, the problem looks very similar to fault in finger, which also garbled UTF-8 output, this was caused by outputting a string byte by byte with putc instead pushing whole string at once to terminal. Maybe this is the case? What terminal do you use? I can reproduce this on: - local text console (linux) - remote linux console (text console + ssh connection) - local konsole (kde konsole) - remote konsole (kde konsole + ssh) konsole identifies itself as xterm (TERM=xterm) I take back local konsole part - in this case dialog box is displayed and my name is displayed correctly. The terminal output is handled by pinentry. Created attachment 499280 [details]
pinentry-curses garbled output
I tried the following in pinentry-curses: gklab-63-001:~> pinentry-curses OK Your orders please option lc-ctype=pl_PL.UTF-8 OK setdesc ąćęłńóśźżĄĆĘŁŃÓŚŹŻ OK getpin which resulted in the attached above screen. This seems to confirm that a problem is in pinentry. This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative. The bug can be reproduced in also in RHEL 6. Thank you for the bugreport. For the record, upstream fixed this[1]. Have yet to look at possible backporting. [1] http://git.gnupg.org/cgi-bin/gitweb.cgi?p=pinentry.git;a=commitdiff;h=e2b89cbdcba7475047ca3c46fc7d03825355b3ff *** Bug 1191639 has been marked as a duplicate of this bug. *** dist-git commits related to build pinentry-0.7.6-8.el6: http://pkgs.devel.redhat.com/cgit/rpms/pinentry/commit/?h=rhel-6.7&id=311a4d55bd96fffe1efe898c81afce986f0bcac1 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0755.html |
Created attachment 498757 [details] garbled output from gpg when asking for password Description of problem: gnupg2 requires usage of agent to retrieve key passphrase. Console version of this agent doesn't seem to support UTF-8 properly - see the attached screenshot. Version-Release number of selected component (if applicable): gnupg2-2.0.14-4.el6.i686 How reproducible: always Steps to Reproduce: Use gpg on a key which contains non-ascii characters in its name. Actual results: The output is garbled Expected results: The output is clean. Additional info: Detected on ScientificLinux 6 but I guess this is also a case on RHEL.