mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-23 10:29:58 +01:00
Add KEY_CREATED status
This commit is contained in:
parent
9b12847f25
commit
a66fa9c25e
@ -1,3 +1,8 @@
|
|||||||
|
2001-01-03 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* status.c, status.h : New status KEY_CREATED
|
||||||
|
* keygen.c (do_generate_keypair,generate_subkeypair): Emit it.
|
||||||
|
|
||||||
2000-12-28 Werner Koch <wk@gnupg.org>
|
2000-12-28 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
* signal.c (got_fatal_signal): Remove lockfiles here because the
|
* signal.c (got_fatal_signal): Remove lockfiles here because the
|
||||||
|
@ -1511,6 +1511,7 @@ do_generate_keypair( struct para_data_s *para,
|
|||||||
PKT_secret_key *sk = NULL;
|
PKT_secret_key *sk = NULL;
|
||||||
const char *s;
|
const char *s;
|
||||||
int rc;
|
int rc;
|
||||||
|
int did_sub = 0;
|
||||||
|
|
||||||
if( outctrl->dryrun ) {
|
if( outctrl->dryrun ) {
|
||||||
log_info("dry-run mode - key generation skipped\n");
|
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);
|
rc = write_keybinding(pub_root, pub_root, sk);
|
||||||
if( !rc )
|
if( !rc )
|
||||||
rc = write_keybinding(sec_root, pub_root, sk);
|
rc = write_keybinding(sec_root, pub_root, sk);
|
||||||
|
did_sub = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1689,6 +1691,9 @@ do_generate_keypair( struct para_data_s *para,
|
|||||||
else
|
else
|
||||||
tty_printf(_("Key generation failed: %s\n"), g10_errstr(rc) );
|
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( pub_root );
|
||||||
release_kbnode( sec_root );
|
release_kbnode( sec_root );
|
||||||
if( sk ) /* the unprotected secret key */
|
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);
|
rc = write_keybinding(pub_keyblock, pub_keyblock, sk);
|
||||||
if( !rc )
|
if( !rc )
|
||||||
rc = write_keybinding(sec_keyblock, pub_keyblock, sk);
|
rc = write_keybinding(sec_keyblock, pub_keyblock, sk);
|
||||||
if( !rc )
|
if( !rc ) {
|
||||||
okay = 1;
|
okay = 1;
|
||||||
|
write_status_text (STATUS_KEY_CREATED, "S");
|
||||||
|
}
|
||||||
|
|
||||||
leave:
|
leave:
|
||||||
if( rc )
|
if( rc )
|
||||||
|
@ -136,6 +136,7 @@ get_status_string ( int no )
|
|||||||
case STATUS_POLICY_URL : s = "POLICY_URL" ; break;
|
case STATUS_POLICY_URL : s = "POLICY_URL" ; break;
|
||||||
case STATUS_BEGIN_STREAM : s = "BEGIN_STREAM"; break;
|
case STATUS_BEGIN_STREAM : s = "BEGIN_STREAM"; break;
|
||||||
case STATUS_END_STREAM : s = "END_STREAM"; break;
|
case STATUS_END_STREAM : s = "END_STREAM"; break;
|
||||||
|
case STATUS_KEY_CREATED : s = "KEY_CREATED"; break;
|
||||||
default: s = "?"; break;
|
default: s = "?"; break;
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
#define STATUS_POLICY_URL 55
|
#define STATUS_POLICY_URL 55
|
||||||
#define STATUS_BEGIN_STREAM 56
|
#define STATUS_BEGIN_STREAM 56
|
||||||
#define STATUS_END_STREAM 57
|
#define STATUS_END_STREAM 57
|
||||||
|
#define STATUS_KEY_CREATED 58
|
||||||
|
|
||||||
/*-- status.c --*/
|
/*-- status.c --*/
|
||||||
void set_status_fd ( int fd );
|
void set_status_fd ( int fd );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user