Passphrase of GPG-generated key not accepted

Daniel Link stagger at gmx.net
Sat Aug 13 13:41:41 CEST 2005


> GPA and other applications based upon the Gtk+-2 library (and all kde 
> stuff, btw) use utf8 to encode national characters (basically two chars 
> for german umlauts, as you saw in the outout). As a rule of thumb, if
> you  use your key primarily via a gui application (i.e. you enter the 
> passphrase via gpg-agent and pinentry-{gtk2|qt}), I would suggest to 
> replace the iso8859 encoded passphrase by the same one encoded in utf8.
> An  other option would be to use utf8 encodings in the standard xterm 
> environment as well. I covered that problem in a faq about using 
> encryption with the mua balsa ("I created a key but balsa never accepts
> my  passphrase?"): 
> http://home.arcor.de/dralbrecht.dress/balsa/balsa23-secure-mail.html#FAQ

Wouldn't it be a good idea to include character encoding information in
keys? I think so. Many people don't use UTF-8 yet. Demanding such
configuration like you mentioned from all these users sounds
unreasonable to me. Isn't a workaround possible? Since I use GTK+
applications for quite a while now and never experienced similar
problems this would be my solution of choice. Don't ask me about
implementation though.
Changing the key already sent to key servers and several people from my
address book doesn't sound very appealing to me either. Perhaps you'll
beg to differ, but in my opinion an application like GPA should work out
of the box, no matter which encoding.

> CFLAGS="-O0 -g" ./configure <your cfg options>
> 
> rebuild gpa, and then run gpa in gdb. When it crashes, say "bt full" to 
> get a full trace.

I've used

$ CFLAGS="-O0 -g -O2 -march=pentium4 -fomit-frame-pointer" ./configure \
  --prefix=/my/path

to configure, compiled GPA and ran it inside the debugger. Here's what
it said:

<gdb output begins>
(gdb) file /my/path/bin/gpa
Reading symbols from /my/path/bin/gpa...done.
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /my/path/bin/gpa

Program received signal SIGSEGV, Segmentation fault.
0x0805001a in gpa_window_show_centered (widget=0x827b1d8, parent=0x0) at
gtktools.c:47
47        gdk_window_get_origin (parent->window, &parent_x, &parent_y);
(gdb) bt full
#0  0x0805001a in gpa_window_show_centered (widget=0x827b1d8,
parent=0x0) at gtktools.c:47
        parent_x = -1209855117
        parent_y = 136819160
        parent_width = 136819160
        parent_height = -1076559632
        center_x = 136819160
        center_y = 136819512
        width = 447
        height = 362
        child = (GtkWidget *) 0x827b338
#1  0x08050dbf in gpa_get_save_file_name (parent=0xbfd500ac,
title=0xbfd500ac "s\023ã·Ø±'\b¿\001", directory=0x0) at gtktools.c:432
        dialog = {window = 0x827b1d8, filename = 0x0}
        window = (GtkWidget *) 0x827b1d8
#2  0x08070182 in export_browse (param=0x8108f68) at gpabackupop.c:252
        filename = (gchar *) 0x80ef800 "\002"
#3  0xb7b25900 in g_cclosure_marshal_VOID__VOID () from
/usr/lib/libgobject-2.0.so.0
No symbol table info available.
<gdb output ends>

If you need any more information, feel free to ask.

Daniel

PS: Please put your own address in CC and the mailing address' in TO.
This makes replying easier since one doesn't have to manually change the
recipient or choose "Reply to CC" every time. It won't hurt you either,
if you don't tend to answer your own messages.



More information about the Gpa-dev mailing list