mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +01:00
gpg: Use format_keyid rather than manually formatting the keyid.
* g10/keyedit.c (menu_addrevoker): Use format_keyid rather than manually formatting the keyid. * g10/keygen.c (card_write_key_to_backup_file): Likewise. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
bf9d1248c8
commit
10671c3a4c
@ -3953,8 +3953,7 @@ menu_addrevoker (ctrl_t ctrl, kbnode_t pub_keyblock, int sensitive)
|
||||
log_error (_("this key has already been designated "
|
||||
"as a revoker\n"));
|
||||
|
||||
sprintf (buf, "%08lX%08lX",
|
||||
(ulong) pk->keyid[0], (ulong) pk->keyid[1]);
|
||||
format_keyid (pk_keyid (pk), KF_LONG, buf, sizeof (buf));
|
||||
write_status_text (STATUS_ALREADY_SIGNED, buf);
|
||||
|
||||
break;
|
||||
|
@ -3840,15 +3840,15 @@ card_write_key_to_backup_file (PKT_public_key *sk, const char *backup_dir)
|
||||
{
|
||||
gpg_error_t err = 0;
|
||||
int rc;
|
||||
char keyid_buffer[2 * 8 + 1];
|
||||
char name_buffer[50];
|
||||
char *fname;
|
||||
IOBUF fp;
|
||||
mode_t oldmask;
|
||||
PACKET *pkt = NULL;
|
||||
|
||||
keyid_from_pk (sk, NULL);
|
||||
snprintf (name_buffer, sizeof name_buffer, "sk_%08lX%08lX.gpg",
|
||||
(ulong)sk->keyid[0], (ulong)sk->keyid[1]);
|
||||
format_keyid (pk_keyid (sk), KF_LONG, keyid_buffer, sizeof (keyid_buffer));
|
||||
snprintf (name_buffer, sizeof name_buffer, "sk_%s.gpg", keyid_buffer);
|
||||
|
||||
fname = make_filename (backup_dir, name_buffer, NULL);
|
||||
/* Note that the umask call is not anymore needed because
|
||||
|
Loading…
x
Reference in New Issue
Block a user