summaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>1998-09-29 18:15:15 +0200
committerWerner Koch <wk@gnupg.org>1998-09-29 18:15:15 +0200
commit9a854f1010d6311576b823b6638997f9778b4327 (patch)
treea2f20737cfaa86e6faaeebfef81892e7c56bfa63 /g10
parent*** empty log message *** (diff)
downloadgnupg2-9a854f1010d6311576b823b6638997f9778b4327.tar.xz
gnupg2-9a854f1010d6311576b823b6638997f9778b4327.zip
*** empty log message ***
Diffstat (limited to 'g10')
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/g10.c11
-rw-r--r--g10/import.c5
-rw-r--r--g10/mainproc.c4
-rw-r--r--g10/plaintext.c4
-rw-r--r--g10/trustdb.c10
6 files changed, 30 insertions, 9 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index e767f75be..6b2f787fa 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+Tue Sep 29 08:32:08 1998 me,,, (wk@tobold)
+
+ * mainproc.c (proc_plaintext): Display note for special filename.
+ * plaintext.c (handle_plaintext): Suppress output of special file.
+
Mon Sep 28 12:57:12 1998 Werner Koch (wk@isil.d.shuttle.de)
* g10.c (verify_own_keys): Add warning if a key is not protected.
diff --git a/g10/g10.c b/g10/g10.c
index 891da839e..975876f73 100644
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -215,11 +215,11 @@ static ARGPARSE_OPTS opts[] = {
{ oMarginalsNeeded, "marginals-needed", 1, N_("(default is 3)")},
{ oLoadExtension, "load-extension" ,2, N_("|file|load extension module")},
{ oRFC1991, "rfc1991", 0, N_("emulate the mode described in RFC1991")},
- { oS2KMode, "s2k-mode", 1, N_("|N| use passphrase mode N")},
+ { oS2KMode, "s2k-mode", 1, N_("|N|use passphrase mode N")},
{ oS2KDigest, "s2k-digest-algo",2,
- N_("|NAME| use message digest algorithm NAME for passphrases")},
+ N_("|NAME|use message digest algorithm NAME for passphrases")},
{ oS2KCipher, "s2k-cipher-algo",2,
- N_("|NAME| use cipher algorithm NAME for passphrases")},
+ N_("|NAME|use cipher algorithm NAME for passphrases")},
#ifdef IS_G10
{ oCipherAlgo, "cipher-algo", 2 , N_("|NAME|use cipher algorithm NAME")},
{ oDigestAlgo, "digest-algo", 2 , N_("|NAME|use message digest algorithm NAME")},
@@ -789,7 +789,10 @@ main( int argc, char **argv )
if( opt.marginals_needed < 2 )
log_error(_("marginals-needed must be greater than 1\n"));
switch( opt.s2k_mode ) {
- case 0: case 1: case 3: break;
+ case 0:
+ log_info(_("note: simple S2K mode (0) is strongly discouraged\n"));
+ break;
+ case 1: case 3: break;
default:
log_error(_("invalid S2K mode; must be 0, 1 or 3\n"));
}
diff --git a/g10/import.c b/g10/import.c
index 12a2a099d..63d4bf9b2 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -247,6 +247,7 @@ import_one( const char *fname, KBNODE keyblock )
u32 keyid[2];
int rc = 0;
int new_key = 0;
+ int mod_key = 0;
/* get the key and print some info about it */
node = find_kbnode( keyblock, PKT_PUBLIC_KEY );
@@ -284,6 +285,7 @@ import_one( const char *fname, KBNODE keyblock )
return 0;
}
+
/* do we have this key already in one of our pubrings ? */
pk_orig = m_alloc_clear( sizeof *pk_orig );
rc = get_pubkey( pk_orig, keyid );
@@ -350,6 +352,7 @@ import_one( const char *fname, KBNODE keyblock )
if( rc )
goto leave;
if( n_uids || n_sigs || n_subk ) {
+ mod_key = 1;
/* keyblock_orig has been updated; write */
if( opt.verbose > 1 )
log_info_f(keyblock_resource_name(&kbpos),
@@ -394,6 +397,8 @@ import_one( const char *fname, KBNODE keyblock )
log_error("key %08lX: trustdb insert failed: %s\n",
(ulong)keyid[1], g10_errstr(rc) );
}
+ else if( mod_key )
+ rc = update_trustdb( new_key? pk: pk_orig);
else
rc = clear_trust_checked_flag( new_key? pk : pk_orig );
}
diff --git a/g10/mainproc.c b/g10/mainproc.c
index bcbc4bd92..dd40c10f5 100644
--- a/g10/mainproc.c
+++ b/g10/mainproc.c
@@ -243,7 +243,9 @@ proc_plaintext( CTX c, PACKET *pkt )
int any, clearsig, rc;
KBNODE n;
- if( opt.verbose )
+ if( pt->namelen == 8 && !memcmp( pt->name, "_CONSOLE", 8 ) )
+ log_info(_("note: sender requested \"for-your-eyes-only\"\n"));
+ else if( opt.verbose )
log_info("original file name='%.*s'\n", pt->namelen, pt->name);
free_md_filter_context( &c->mfx );
c->mfx.md = md_open( 0, 0);
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 6d1c8796f..b1201b8b7 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -98,6 +98,10 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
fname = m_alloc( strlen( opt.outfile ) + 1);
strcpy(fname, opt.outfile );
}
+ else if( pt->namelen == 8 && !memcmp( pt->name, "_CONSOLE", 8 ) ) {
+ log_info(_("data not saved; use option \"--output\" to save it\n"));
+ nooutput = 1;
+ }
else {
fname = m_alloc( pt->namelen +1 );
memcpy( fname, pt->name, pt->namelen );
diff --git a/g10/trustdb.c b/g10/trustdb.c
index b36c176ae..7bb015844 100644
--- a/g10/trustdb.c
+++ b/g10/trustdb.c
@@ -909,15 +909,16 @@ update_sigs( TRUSTREC *dir )
if( (sig->sig_class&~3) == 0x10 ) {
rc = check_key_signature( keyblock, node, &i );
if( rc == G10ERR_NO_PUBKEY ) {
- log_info("key %08lX.%lu, uid %02X%02X: "
- "no public key for signature %08lX\n",
+ if( opt.verbose )
+ log_info(_("key %08lX.%lu, uid %02X%02X: "
+ "no public key for signature %08lX\n"),
(ulong)keyid[1], lid, urec.r.uid.namehash[18],
urec.r.uid.namehash[19], (ulong)sig->keyid[1] );
miskey = 1;
}
else if( rc )
- log_error("key %08lX.%lu, uid %02X%02X: "
- "invalid %ssignature: %s\n",
+ log_info(_("key %08lX.%lu, uid %02X%02X: "
+ "invalid %ssignature: %s\n"),
(ulong)keyid[1], lid, urec.r.uid.namehash[18],
urec.r.uid.namehash[19],
i?"self-":"",g10_errstr(rc));
@@ -1520,6 +1521,7 @@ list_trust_path( int max_depth, const char *username )
/****************
* Check the complete trustdb or only the entries for the given username
+ * FIXME: We need a mode which only looks at keys with the MISKEY flag set.
*/
void
check_trustdb( const char *username )