TRACEPOINT();
load_secbox (HWND dlg, int ctlid){  gpg_error_t err;  gpgme_ctx_t ctx;  gpgme_key_t key;  int pos;  gpgme_key_t *keyarray;  size_t keyarray_size;  TRACEPOINT();  err = gpgme_new (&ctx);  if (err)    return NULL;  TRACEPOINT();  err = gpgme_op_keylist_start (ctx, NULL, 1);  if (err)    {      log_error ("failed to initiate key listing: %s\n", gpg_strerror (err));      gpgme_release (ctx);      return NULL;    }  TRACEPOINT();  keyarray_size = 20;   keyarray = xcalloc (keyarray_size+1, sizeof *keyarray);  pos = 0;  while (!gpgme_op_keylist_next (ctx, &key))     {      const char *name, *email, *keyid, *algo;      char *p;        TRACEPOINT();      if (key->revoked || key->expired || key->disabled || key->invalid)        {          gpgme_key_release (key);          continue;        }      if (!key->uids || !key->subkeys)        {          gpgme_key_release (key);          continue;        }              name = key->uids->name;      if (!name)        name = "";      email = key->uids->email;      if (!email)	email = "";      keyid = key->subkeys->keyid;      if (!keyid || strlen (keyid) < 8)        {          gpgme_key_release (key);          continue;        }      algo = get_pubkey_algo_str (key->subkeys->pubkey_algo);      p = xmalloc (strlen (name) + strlen (email) + strlen (keyid+8) + 3 + 20);      if (email && *email)	sprintf (p, "%s <%s> (0x%s, %s)", name, email, keyid+8, algo);      else	sprintf (p, "%s (0x%s, %s)", name, keyid+8, algo);      SendDlgItemMessage (dlg, ctlid, CB_ADDSTRING, 0, 			  (LPARAM)(const char *) p);      xfree (p);  TRACEPOINT();      SendDlgItemMessage (dlg, ctlid, CB_SETITEMDATA, pos, (LPARAM)pos);  TRACEPOINT();      if (pos >= keyarray_size)        {          gpgme_key_t *tmparr;          size_t i;  TRACEPOINT();          keyarray_size += 10;          tmparr = xcalloc (keyarray_size, sizeof *tmparr);          for (i=0; i < pos; i++)            tmparr[i] = keyarray[i];          xfree (keyarray);          keyarray = tmparr;        }      keyarray[pos++] = key;  TRACEPOINT();    }  TRACEPOINT();  gpgme_op_keylist_end (ctx);  gpgme_release (ctx);  TRACEPOINT();  return keyarray;}