1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

See ChangeLog: Wed Jul 14 19:42:08 CEST 1999 Werner Koch

This commit is contained in:
Werner Koch 1999-07-14 17:47:23 +00:00
parent 68512418bd
commit 40f2d9f830
22 changed files with 3028 additions and 2677 deletions

View file

@ -1,3 +1,12 @@
Wed Jul 14 19:42:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
* status.h (STATUS_IMPORTED): New.
* import.c (import): Print some status information (Holger Schurig).
* g10.c (main): Make --no-greeting work again. Add a warning when
--force-mds is used.
Tue Jul 13 17:39:25 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>

View file

@ -212,7 +212,7 @@ static ARGPARSE_OPTS opts[] = {
{ aImportOwnerTrust,
"import-ownertrust", 256 , N_("import ownertrust values")},
{ aUpdateTrustDB,
"update-trustdb",0 , N_("|[NAMES]|update the trust database")},
"update-trustdb",0 , N_("update the trust database")},
{ aCheckTrustDB,
"check-trustdb",0 , N_("|[NAMES]|check the trust database")},
{ aFixTrustDB, "fix-trustdb",0 , N_("fix a corrupted trust database")},
@ -526,6 +526,7 @@ main( int argc, char **argv )
int default_config =1;
int default_keyring = 1;
int greeting = 0;
int nogreeting = 0;
enum cmd_and_opt_values cmd = 0;
const char *trustdb_name = NULL;
char *def_cipher_string = NULL;
@ -722,7 +723,7 @@ main( int argc, char **argv )
break;
case oNoArmor: opt.no_armor=1; opt.armor=0; break;
case oNoDefKeyring: default_keyring = 0; break;
case oNoGreeting: greeting = 0; break;
case oNoGreeting: nogreeting = 1; break;
case oNoVerbose: g10_opt_verbose = 0;
opt.verbose = 0; opt.list_sigs=0; break;
case oQuickRandom: quick_random_gen(1); break;
@ -845,6 +846,8 @@ main( int argc, char **argv )
m_free( configname ); configname = NULL;
if( log_get_errorcount(0) )
g10_exit(2);
if( nogreeting )
greeting = 0;
if( greeting ) {
fprintf(stderr, "%s %s; %s\n",
@ -855,6 +858,11 @@ main( int argc, char **argv )
if( !opt.batch )
log_info("NOTE: this is a development version!\n");
#endif
if( opt.force_mdc ) {
log_info("--force-mdc ignored because"
" the OpenPGP WG has not yet aggreed on MDCs\n");
opt.force_mdc = 0;
}
if( opt.batch )
tty_batchmode( 1 );

View file

@ -34,6 +34,7 @@
#include "trustdb.h"
#include "main.h"
#include "i18n.h"
#include "status.h"
static struct {
@ -199,6 +200,24 @@ import( IOBUF inp, int fast, const char* fname )
log_info(_(" secret keys unchanged: %lu\n"), stats.secret_dups );
}
if( is_status_enabled() ) {
char buf[12*16];
sprintf(buf, "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
count,
stats.no_user_id,
stats.imported,
stats.imported_rsa,
stats.unchanged,
stats.n_uids,
stats.n_subk,
stats.n_sigs,
stats.n_revoc,
stats.secret_read,
stats.secret_imported,
stats.secret_dups);
write_status_text( STATUS_IMPORT_RES, buf );
}
return rc;
}
@ -385,6 +404,11 @@ import_one( const char *fname, KBNODE keyblock, int fast )
/* we are ready */
if( !opt.quiet )
log_info( _("key %08lX: public key imported\n"), (ulong)keyid[1]);
if( is_status_enabled() ) {
char *us = get_long_user_id_string( keyid );
write_status_text( STATUS_IMPORTED, us );
m_free(us);
}
stats.imported++;
if( is_RSA( pk->pubkey_algo ) )
stats.imported_rsa++;

View file

@ -115,6 +115,8 @@ write_status_text ( int no, const char *text)
case STATUS_GOODMDC : s = "GOODMDC\n"; break;
case STATUS_BADMDC : s = "BADMDC\n"; break;
case STATUS_ERRMDC : s = "ERRMDC\n"; break;
case STATUS_IMPORTED : s = "IMPORTED\n"; break;
case STATUS_IMPORT_RES : s = "IMPORT_RES\n"; break;
default: s = "?\n"; break;
}

View file

@ -63,6 +63,9 @@
#define STATUS_GOODMDC 33
#define STATUS_BADMDC 34
#define STATUS_ERRMDC 35
#define STATUS_IMPORTED 36
#define STATUS_IMPORT_RES 37
/*-- status.c --*/
void set_status_fd ( int fd );