/[winpt]/trunk/Src/wptVerifyList.cpp
ViewVC logotype

Diff of /trunk/Src/wptVerifyList.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 76 by twoaday, Thu Nov 10 14:07:06 2005 UTC revision 109 by twoaday, Fri Dec 2 07:32:13 2005 UTC
# Line 74  strtimestamp (long timestamp) Line 74  strtimestamp (long timestamp)
74  }  }
75    
76    
 /* Map the signature summary in @sum to signature status table index.  
    Return value: index to table. */  
 int  
 sigsum_to_index (gpgme_sigsum_t sum)  
 {  
     if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_KEY_REVOKED))  
         return 7;  
     if ((sum & GPGME_SIGSUM_VALID) && (sum & GPGME_SIGSUM_SIG_EXPIRED))  
         return 6;  
     if (sum & GPGME_SIGSUM_GREEN)  
         return 1;  
     else if (sum & GPGME_SIGSUM_RED)  
         return 2;  
     else if (sum & GPGME_SIGSUM_KEY_MISSING)  
         return 3;  
     return 0;  
 }  
   
   
77  /* Build a verify signature list control. With the parent window  /* Build a verify signature list control. With the parent window
78     from @ctrl and the mod given in @fm_mode. @lv contains the     from @ctrl and the mod given in @fm_mode. @lv contains the
79     new control on success.     new control on success.
# Line 164  verlist_add_sig (listview_ctrl_t lv, gpg Line 145  verlist_add_sig (listview_ctrl_t lv, gpg
145          return WPTERR_GENERAL;          return WPTERR_GENERAL;
146            
147      get_pubkey (sig->fpr, &key);      get_pubkey (sig->fpr, &key);
148        
149      if (sig->summary == 0 && gpg_err_code (sig->status) == GPG_ERR_NO_ERROR)      if (sig->summary == 0 && gpg_err_code (sig->status) == GPG_ERR_NO_ERROR)
150          attr = get_gpg_sigstat (GPGME_SIGSUM_GREEN);          attr = get_gpg_sigstat (GPGME_SIGSUM_GREEN);
151      else      else
# Line 223  verlist_add_sig_log (listview_ctrl_t lv, Line 204  verlist_add_sig_log (listview_ctrl_t lv,
204      const char *attr;          const char *attr;    
205      char t[64], *name;      char t[64], *name;
206    
207      if (listview_add_item (lv, ""))      if (listview_add_item (lv, "")) {
208            log_debug ("verlist_add_sig_log: listview_add_item() failed.\n");
209          return WPTERR_GENERAL;          return WPTERR_GENERAL;
210        }
211    
212      get_pubkey (sig->fpr, &key);      get_pubkey (sig->fpr, &key);
213            
# Line 234  verlist_add_sig_log (listview_ctrl_t lv, Line 217  verlist_add_sig_log (listview_ctrl_t lv,
217      else      else
218          listview_add_sub_item (lv, 0, 0, log->file);          listview_add_sub_item (lv, 0, 0, log->file);
219      free_if_alloc (name);      free_if_alloc (name);
220        
221      if (sig->summary == 0 && gpg_err_code (sig->status) == GPG_ERR_NO_ERROR)      if (sig->summary == 0 && gpg_err_code (sig->status) == GPG_ERR_NO_ERROR)
222          attr = get_gpg_sigstat (GPGME_SIGSUM_GREEN);          attr = get_gpg_sigstat (GPGME_SIGSUM_GREEN);
223      else      else
# Line 259  verlist_add_sig_log (listview_ctrl_t lv, Line 242  verlist_add_sig_log (listview_ctrl_t lv,
242          _snprintf (t, sizeof (t)-1, "0x%s", attr + 32);          _snprintf (t, sizeof (t)-1, "0x%s", attr + 32);
243          listview_add_sub_item (lv, 0, 4, t);          listview_add_sub_item (lv, 0, 4, t);
244      }      }
245      else if( !log->use_uid && strlen( attr ) == 32 ) {      else if (!log->use_uid && strlen( attr ) == 32) {
246          _snprintf (t, sizeof (t)-1, "0x%s", attr + 24);          _snprintf (t, sizeof (t)-1, "0x%s", attr + 24);
247          listview_add_sub_item (lv, 0, 4, t);          listview_add_sub_item (lv, 0, 4, t);
248      }      }

Legend:
Removed from v.76  
changed lines
  Added in v.109

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26