1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Add KEY_CREATED status

This commit is contained in:
Werner Koch 2001-01-03 13:36:03 +00:00
parent 9b12847f25
commit a66fa9c25e
4 changed files with 15 additions and 2 deletions

View file

@ -1511,6 +1511,7 @@ do_generate_keypair( struct para_data_s *para,
PKT_secret_key *sk = NULL;
const char *s;
int rc;
int did_sub = 0;
if( outctrl->dryrun ) {
log_info("dry-run mode - key generation skipped\n");
@ -1609,6 +1610,7 @@ do_generate_keypair( struct para_data_s *para,
rc = write_keybinding(pub_root, pub_root, sk);
if( !rc )
rc = write_keybinding(sec_root, pub_root, sk);
did_sub = 1;
}
@ -1689,6 +1691,9 @@ do_generate_keypair( struct para_data_s *para,
else
tty_printf(_("Key generation failed: %s\n"), g10_errstr(rc) );
}
else {
write_status_text (STATUS_KEY_CREATED, did_sub? "B":"P");
}
release_kbnode( pub_root );
release_kbnode( sec_root );
if( sk ) /* the unprotected secret key */
@ -1783,8 +1788,10 @@ generate_subkeypair( KBNODE pub_keyblock, KBNODE sec_keyblock )
rc = write_keybinding(pub_keyblock, pub_keyblock, sk);
if( !rc )
rc = write_keybinding(sec_keyblock, pub_keyblock, sk);
if( !rc )
if( !rc ) {
okay = 1;
write_status_text (STATUS_KEY_CREATED, "S");
}
leave:
if( rc )