1 diff -ur gnupg-1.3.6.orig/g10/keyedit.c gnupg-1.3.6/g10/keyedit.c
2 --- gnupg-1.3.6.orig/g10/keyedit.c 2004-05-22 13:26:00.000000000 +0200
3 +++ gnupg-1.3.6/g10/keyedit.c 2004-06-12 15:32:51.219996456 +0200
7 if( sigrc != '?' || print_without_key ) {
8 - tty_printf("%s%c%c %c%c%c%c%c%c %s %s",
9 - is_rev? "rev":"sig",sigrc,
10 - (sig->sig_class-0x10>0 &&
11 - sig->sig_class-0x10<4)?'0'+sig->sig_class-0x10:' ',
12 - sig->flags.exportable?' ':'L',
13 - sig->flags.revocable?' ':'R',
14 - sig->flags.policy_url?'P':' ',
15 - sig->flags.notation?'N':' ',
16 - sig->flags.expired?'X':' ',
17 - (sig->trust_depth>9)?'T':
18 - (sig->trust_depth>0)?'0'+sig->trust_depth:' ',
19 - keystr(sig->keyid),datestr_from_sig(sig));
20 - if(opt.list_options&LIST_SHOW_SIG_EXPIRE)
21 - tty_printf(" %s",expirestr_from_sig(sig));
24 - tty_printf("[%s] ", g10_errstr(rc) );
25 - else if( sigrc == '?' )
27 - else if( *is_selfsig ) {
28 - tty_printf( is_rev? _("[revocation]")
29 - : _("[self-signature]") );
33 + if (opt.with_colons) {
35 - char *p = get_user_id( sig->keyid, &n );
36 - tty_print_utf8_string2( p, n, opt.screen_columns-keystrlen()-26 );
41 - if(sig->flags.policy_url && (opt.list_options&LIST_SHOW_POLICY_URLS))
42 - show_policy_url(sig,3,0);
43 + printf("%s:%c::%d:%08lX%08lX:%s:%s:::",
44 + is_rev? "rev":"sig", sigrc,
46 + (ulong)sig->keyid[0], (ulong)sig->keyid[1],
47 + colon_datestr_from_sig(sig),
48 + colon_expirestr_from_sig(sig));
49 + if( sigrc != '%' && sigrc != '?') {
51 + p = get_user_id( sig->keyid, &n);
52 + print_string( stdout, p, n, ':' );
55 + printf(":%02x%c:\n",
56 + sig->sig_class,sig->flags.exportable?'x':'l'
59 + tty_printf("%s%c%c %c%c%c%c%c%c %s %s",
60 + is_rev? "rev":"sig",sigrc,
61 + (sig->sig_class-0x10>0 &&
62 + sig->sig_class-0x10<4)?'0'+sig->sig_class-0x10:' ',
63 + sig->flags.exportable?' ':'L',
64 + sig->flags.revocable?' ':'R',
65 + sig->flags.policy_url?'P':' ',
66 + sig->flags.notation?'N':' ',
67 + sig->flags.expired?'X':' ',
68 + (sig->trust_depth>9)?'T':
69 + (sig->trust_depth>0)?'0'+sig->trust_depth:' ',
70 + keystr(sig->keyid),datestr_from_sig(sig));
71 + if(opt.list_options&LIST_SHOW_SIG_EXPIRE)
72 + tty_printf(" %s",expirestr_from_sig(sig));
75 + tty_printf("[%s] ", g10_errstr(rc) );
76 + else if( sigrc == '?' )
78 + else if( *is_selfsig ) {
79 + tty_printf( is_rev? _("[revocation]")
80 + : _("[self-signature]") );
85 + char *p = get_user_id( sig->keyid, &n );
86 + tty_print_utf8_string2( p, n, opt.screen_columns-keystrlen()-26 );
91 + if(sig->flags.policy_url && (opt.list_options&LIST_SHOW_POLICY_URLS))
92 + show_policy_url(sig,3,0);
94 - if(sig->flags.notation && (opt.list_options&LIST_SHOW_NOTATIONS))
95 - show_notation(sig,3,0,
96 - ((opt.list_options&LIST_SHOW_STD_NOTATIONS)?1:0)+
97 - ((opt.list_options&LIST_SHOW_USER_NOTATIONS)?2:0));
98 + if(sig->flags.notation && (opt.list_options&LIST_SHOW_NOTATIONS))
99 + show_notation(sig,3,0,
100 + ((opt.list_options&LIST_SHOW_STD_NOTATIONS)?1:0)+
101 + ((opt.list_options&LIST_SHOW_USER_NOTATIONS)?2:0));
103 - if(sig->flags.pref_ks && (opt.list_options&LIST_SHOW_KEYSERVER_URLS))
104 - show_keyserver_url(sig,3,0);
105 + if(sig->flags.pref_ks && (opt.list_options&LIST_SHOW_KEYSERVER_URLS))
106 + show_keyserver_url(sig,3,0);
110 return (sigrc == '!');
111 @@ -1812,7 +1832,7 @@
114 for(i=0; prefs[i].type; i++ ) {
115 - tty_printf( " %c%d", prefs[i].type == PREFTYPE_SYM ? 'S' :
116 + tty_printf( " %c%d", prefs[i].type == PREFTYPE_SYM ? 'S' :
117 prefs[i].type == PREFTYPE_HASH ? 'H' :
118 prefs[i].type == PREFTYPE_ZIP ? 'Z':'?',
120 @@ -1826,6 +1846,82 @@
124 +/* This shows one uid, in an easy to parse format and does not translate utf8 */
126 +show_one_uid_colon (KBNODE node, int index, PKT_public_key *primary, int ulti_hack, int pk_version)
129 + assert ( node->pkt->pkttype == PKT_USER_ID );
130 + PKT_user_id *uid = node->pkt->pkt.user_id;
132 + if(uid->attrib_data)
137 + if ( uid->is_revoked )
138 + printf("r::::::::");
139 + else if ( uid->is_expired )
140 + printf("e::::::::");
141 + else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
142 + printf("::::::::");
147 + if( primary && !ulti_hack )
148 + uid_validity = get_validity_info( primary, uid );
150 + uid_validity = 'u';
151 + printf("%c::::::::",uid_validity);
154 + if(uid->attrib_data)
155 + printf ("%u %lu",uid->numattribs,uid->attrib_len);
157 + print_string (stdout, uid->name, uid->len, ':');
160 + /* signature class */
165 + if (pk_version>3 || uid->selfsigversion>3)
167 + const prefitem_t *prefs = uid->prefs;
169 + for (j=0; prefs && prefs[j].type; j++)
173 + printf ("%c%d", prefs[j].type == PREFTYPE_SYM ? 'S' :
174 + prefs[j].type == PREFTYPE_HASH ? 'H' :
175 + prefs[j].type == PREFTYPE_ZIP ? 'Z':'?',
178 + if (uid->mdc_feature)
180 + if (!uid->ks_modify)
181 + printf (",no-ks-modify");
185 + printf ("%d,", index);
186 + if (uid->is_primary)
188 + if (uid->is_revoked)
190 + if (uid->is_expired)
192 + if ((node->flag & NODFLG_SELUID))
194 + if ((node->flag & NODFLG_MARK_A))
200 /* This is the version of show_key_with_all_names used when
201 opt.with_colons is used. It prints all available data in a easy to
202 parse format and does not translate utf8 */
203 @@ -1905,80 +2001,12 @@
207 - for (node = keyblock; node; node = node->next)
208 + for (node = keyblock; node; node = node->next)
210 if ( node->pkt->pkttype == PKT_USER_ID )
212 - PKT_user_id *uid = node->pkt->pkt.user_id;
216 - if(uid->attrib_data)
221 - if ( uid->is_revoked )
222 - printf("r::::::::");
223 - else if ( uid->is_expired )
224 - printf("e::::::::");
225 - else if ( opt.fast_list_mode || opt.no_expensive_trust_checks )
226 - printf("::::::::");
231 - if( primary && !ulti_hack )
232 - uid_validity = get_validity_info( primary, uid );
234 - uid_validity = 'u';
235 - printf("%c::::::::",uid_validity);
238 - if(uid->attrib_data)
239 - printf ("%u %lu",uid->numattribs,uid->attrib_len);
241 - print_string (stdout, uid->name, uid->len, ':');
244 - /* signature class */
249 - if (pk_version>3 || uid->selfsigversion>3)
251 - const prefitem_t *prefs = uid->prefs;
253 - for (j=0; prefs && prefs[j].type; j++)
257 - printf ("%c%d", prefs[j].type == PREFTYPE_SYM ? 'S' :
258 - prefs[j].type == PREFTYPE_HASH ? 'H' :
259 - prefs[j].type == PREFTYPE_ZIP ? 'Z':'?',
262 - if (uid->mdc_feature)
264 - if (!uid->ks_modify)
265 - printf (",no-ks-modify");
270 - if (uid->is_primary)
272 - if (uid->is_revoked)
274 - if (uid->is_expired)
276 - if ((node->flag & NODFLG_SELUID))
278 - if ((node->flag & NODFLG_MARK_A))
282 + show_one_uid_colon(node, i, primary, ulti_hack, pk_version);
286 @@ -2506,17 +2534,23 @@
288 PKT_user_id *uid = NULL;
290 + KBNODE uidnode = NULL;
292 for( node = pub_keyblock; node; node = node->next ) {
293 if( node->pkt->pkttype == PKT_USER_ID ) {
294 uid = (node->flag & NODFLG_SELUID)? node->pkt->pkt.user_id : NULL;
297 else if( uid && node->pkt->pkttype == PKT_SIGNATURE ) {
298 int okay, valid, selfsig, inv_sig, no_key, other_err;
300 - tty_printf("uid ");
301 - tty_print_utf8_string( uid->name, uid->len );
303 + if (opt.with_colons)
304 + show_one_uid_colon (uidnode, 0, NULL, 0, 0); /* FIXME: pk_version */
306 + tty_printf("uid ");
307 + tty_print_utf8_string( uid->name, uid->len );
311 okay = inv_sig = no_key = other_err = 0;
312 valid = print_and_check_one_sig( pub_keyblock, node,
313 diff -ur gnupg-1.3.6.orig/g10/status.c gnupg-1.3.6/g10/status.c
314 --- gnupg-1.3.6.orig/g10/status.c 2004-05-22 13:19:05.000000000 +0200
315 +++ gnupg-1.3.6/g10/status.c 2004-06-12 15:25:53.142553888 +0200
323 if( opt.command_fd != -1 )
324 return do_get_from_fd ( keyword, 0, 0 );
325 #ifdef USE_SHM_COPROCESSING
333 if( opt.command_fd != -1 )
334 return do_get_from_fd ( keyword, 0, 0 );
335 #ifdef USE_SHM_COPROCESSING
343 if( opt.command_fd != -1 )
344 return do_get_from_fd ( keyword, 1, 0 );
345 #ifdef USE_SHM_COPROCESSING
353 if( opt.command_fd != -1 )
354 return !!do_get_from_fd ( keyword, 0, 1 );
355 #ifdef USE_SHM_COPROCESSING
363 if( opt.command_fd != -1 )
364 return !!do_get_from_fd ( keyword, 0, 1 );
365 #ifdef USE_SHM_COPROCESSING
373 if( opt.command_fd != -1 )
374 answer = do_get_from_fd ( keyword, 0, 0 );
375 #ifdef USE_SHM_COPROCESSING