| 1272 if (client_entry->public_key) { |
1272 if (client_entry->public_key) { |
| 1273 char *fingerprint, *babbleprint; |
1273 char *fingerprint, *babbleprint; |
| 1274 unsigned char *pk; |
1274 unsigned char *pk; |
| 1275 SilcUInt32 pk_len; |
1275 SilcUInt32 pk_len; |
| 1276 pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len); |
1276 pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len); |
| 1277 fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); |
1277 if (pk) { |
| 1278 babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); |
1278 fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); |
| 1279 purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); |
1279 babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); |
| 1280 purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); |
1280 purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); |
| 1281 silc_free(fingerprint); |
1281 purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); |
| 1282 silc_free(babbleprint); |
1282 silc_free(fingerprint); |
| 1283 silc_free(pk); |
1283 silc_free(babbleprint); |
| |
1284 silc_free(pk); |
| |
1285 } |
| 1284 } |
1286 } |
| 1285 |
1287 |
| 1286 #if 0 /* XXX for now, let's not show attrs here */ |
1288 #if 0 /* XXX for now, let's not show attrs here */ |
| 1287 if (client_entry->attrs) |
1289 if (client_entry->attrs) |
| 1288 purple_request_action(gc, _("User Information"), |
1290 purple_request_action(gc, _("User Information"), |
| 1344 if (client_entry && client_entry->public_key) { |
1346 if (client_entry && client_entry->public_key) { |
| 1345 char *fingerprint, *babbleprint; |
1347 char *fingerprint, *babbleprint; |
| 1346 unsigned char *pk; |
1348 unsigned char *pk; |
| 1347 SilcUInt32 pk_len; |
1349 SilcUInt32 pk_len; |
| 1348 pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len); |
1350 pk = silc_pkcs_public_key_encode(client_entry->public_key, &pk_len); |
| 1349 fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); |
1351 if (pk) { |
| 1350 babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); |
1352 fingerprint = silc_hash_fingerprint(NULL, pk, pk_len); |
| 1351 purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); |
1353 babbleprint = silc_hash_babbleprint(NULL, pk, pk_len); |
| 1352 purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); |
1354 purple_notify_user_info_add_pair(user_info, _("Public Key Fingerprint"), fingerprint); |
| 1353 silc_free(fingerprint); |
1355 purple_notify_user_info_add_pair(user_info, _("Public Key Babbleprint"), babbleprint); |
| 1354 silc_free(babbleprint); |
1356 silc_free(fingerprint); |
| 1355 silc_free(pk); |
1357 silc_free(babbleprint); |
| |
1358 silc_free(pk); |
| |
1359 } |
| 1356 } |
1360 } |
| 1357 |
1361 |
| 1358 purple_notify_userinfo(gc, nickname, user_info, NULL, NULL); |
1362 purple_notify_userinfo(gc, nickname, user_info, NULL, NULL); |
| 1359 purple_notify_user_info_destroy(user_info); |
1363 purple_notify_user_info_destroy(user_info); |
| 1360 } |
1364 } |