Changeset 5434:677e7712d735 for crypt-gpgme.c
- Timestamp:
- 2008-06-29 01:09:33 (5 months ago)
- Branch:
- HEAD
- Files:
-
- 1 modified
-
crypt-gpgme.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
crypt-gpgme.c
r5433 r5434 1253 1253 } 1254 1254 1255 static void print_smime_keyinfo (gpgme_signature_t sig, gpgme_key_t key, 1256 STATE *s) 1257 { 1255 static void print_smime_keyinfo (const char* msg, gpgme_signature_t sig, 1256 gpgme_key_t key, STATE *s) 1257 { 1258 size_t msglen; 1258 1259 gpgme_user_id_t uids = NULL; 1259 int aka = 0; 1260 1260 int i, aka = 0; 1261 1262 state_attach_puts (msg, s); 1263 state_attach_puts (" ", s); 1261 1264 for (uids = key->uids; uids; uids = uids->next) 1262 1265 { … … 1264 1267 continue; 1265 1268 if (aka) 1266 state_attach_puts (_(" aka: "), s); 1269 { 1270 msglen = mutt_strlen (msg) - 4; 1271 for (i = 0; i < msglen; i++) 1272 state_attach_puts(" ", s); 1273 state_attach_puts(_("aka: "), s); 1274 } 1267 1275 state_attach_puts (uids->uid, s); 1268 1276 state_attach_puts ("\n", s); … … 1270 1278 aka = 1; 1271 1279 } 1272 state_attach_puts (_(" created: "), s); 1280 1281 msglen = mutt_strlen (msg) - 8; 1282 for (i = 0; i < msglen; i++) 1283 state_attach_puts(" ", s); 1284 state_attach_puts (_("created: "), s); 1273 1285 print_time (sig->timestamp, s); 1274 1286 state_attach_puts ("\n", s); … … 1288 1300 int i, anybad = 0, anywarn = 0; 1289 1301 unsigned int sum; 1290 gpgme_user_id_t uids = NULL;1291 1302 gpgme_verify_result_t result; 1292 1303 gpgme_signature_t sig; … … 1343 1354 else if ((sum & GPGME_SIGSUM_GREEN)) 1344 1355 { 1345 state_attach_puts (_("Good signature from: "), s); 1346 print_smime_keyinfo (sig, key, s); 1347 state_attach_puts (_(" expires: "), s); 1348 print_time (sig->exp_timestamp, s); 1349 state_attach_puts ("\n", s); 1356 print_smime_keyinfo (_("Good signature from:"), sig, key, s); 1350 1357 if (show_sig_summary (sum, ctx, key, idx, s, sig)) 1351 1358 anywarn = 1; … … 1354 1361 else if ((sum & GPGME_SIGSUM_RED)) 1355 1362 { 1356 state_attach_puts (_("*BAD* signature claimed to be from: "), s); 1357 print_smime_keyinfo (sig, key, s); 1363 print_smime_keyinfo (_("*BAD* signature from:"), sig, key, s); 1358 1364 show_sig_summary (sum, ctx, key, idx, s, sig); 1359 1365 } 1360 1366 else if (!anybad && key && (key->protocol == GPGME_PROTOCOL_OpenPGP)) 1361 { /* We can't decide (yellow) but this is a PGP key with a good 1362 signature, so we display what a PGP user expects: The name, 1363 fingerprint and the key validity (which is neither fully or 1364 ultimate). */ 1365 state_attach_puts (_("Good signature from: "), s); 1366 state_attach_puts (uid, s); 1367 state_attach_puts ("\n", s); 1368 state_attach_puts (_(" created: "), s); 1369 print_time (sig->timestamp, s); 1370 state_attach_puts ("\n", s); 1371 show_one_sig_validity (ctx, idx, s); 1372 show_fingerprint (key,s); 1373 if (show_sig_summary (sum, ctx, key, idx, s, sig)) 1374 anywarn = 1; 1375 } 1367 { /* We can't decide (yellow) but this is a PGP key with a good 1368 signature, so we display what a PGP user expects: The name, 1369 fingerprint and the key validity (which is neither fully or 1370 ultimate). */ 1371 print_smime_keyinfo (_("Good signature from:"), sig, key, s); 1372 show_one_sig_validity (ctx, idx, s); 1373 show_fingerprint (key,s); 1374 if (show_sig_summary (sum, ctx, key, idx, s, sig)) 1375 anywarn = 1; 1376 } 1376 1377 else /* can't decide (yellow) */ 1377 1378 { 1378 state_attach_puts (_("Problem signature from: "), s); 1379 print_smime_keyinfo (sig, key, s); 1380 state_attach_puts (_(" expires: "), s); 1379 print_smime_keyinfo (_("Problem signature from:"), sig, key, s); 1380 state_attach_puts (_(" expires: "), s); 1381 1381 print_time (sig->exp_timestamp, s); 1382 1382 state_attach_puts ("\n", s);
