170 |
} |
} |
171 |
|
|
172 |
|
|
173 |
|
/* Print information (name) of the smart card. */ |
174 |
|
static const char* |
175 |
|
get_card_type (winpt_key_t k) |
176 |
|
{ |
177 |
|
static char buf[64]; |
178 |
|
|
179 |
|
if (!k->ext->card_type) |
180 |
|
return ""; |
181 |
|
_snprintf (buf, sizeof (buf)-1, "Card-Type: %s\r\n", k->ext->card_type); |
182 |
|
return buf; |
183 |
|
} |
184 |
|
|
185 |
|
|
186 |
/* Dialog box procedure to show the key properties. */ |
/* Dialog box procedure to show the key properties. */ |
187 |
BOOL CALLBACK |
BOOL CALLBACK |
188 |
keyprops_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
keyprops_dlg_proc (HWND dlg, UINT msg, WPARAM wparam, LPARAM lparam) |
231 |
"Created: %s\r\n" |
"Created: %s\r\n" |
232 |
"Expires: %s\r\n" |
"Expires: %s\r\n" |
233 |
"Validity: %s\r\n" |
"Validity: %s\r\n" |
234 |
"Cipher: %s\r\n", |
"Cipher: %s\r\n" |
235 |
|
"%s\r\n", |
236 |
get_key_type (key), |
get_key_type (key), |
237 |
k->keyid, |
k->keyid, |
238 |
get_key_algo (key, 0), |
get_key_algo (key, 0), |
240 |
get_key_created (created), |
get_key_created (created), |
241 |
get_key_expire_date (expires), |
get_key_expire_date (expires), |
242 |
get_validity (key), |
get_validity (key), |
243 |
get_pref_cipher (&k2)); |
get_pref_cipher (&k2), |
244 |
|
get_card_type (&k2)); |
245 |
SetDlgItemText (dlg, IDC_KEYPROPS_INFO, info); |
SetDlgItemText (dlg, IDC_KEYPROPS_INFO, info); |
246 |
SetDlgItemText (dlg, IDC_KEYPROPS_FPR, get_key_fpr (key)); |
SetDlgItemText (dlg, IDC_KEYPROPS_FPR, get_key_fpr (key)); |
247 |
ot = gpgme_key_get_ulong_attr( key, GPGME_ATTR_OTRUST, NULL, 0 ); |
ot = gpgme_key_get_ulong_attr( key, GPGME_ATTR_OTRUST, NULL, 0 ); |