diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | acinclude.m4 | 4 | ||||
-rw-r--r-- | doc/DETAILS | 7 | ||||
-rw-r--r-- | g10/ChangeLog | 6 | ||||
-rw-r--r-- | g10/mainproc.c | 1 | ||||
-rw-r--r-- | g10/passphrase.c | 20 | ||||
-rw-r--r-- | g10/status.c | 2 | ||||
-rw-r--r-- | g10/status.h | 2 |
8 files changed, 39 insertions, 9 deletions
@@ -1,3 +1,9 @@ +Thu Apr 8 09:35:53 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> + + * acinclude.m4 (GNUPG_CHECK_RDYNAMIC): Fix for + amiga-openbsd (Peter Reich) + (GNUPG_PROG_NM): Ditto + Wed Apr 7 20:51:39 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> * Makefile.am (g10defs.h): Removed. diff --git a/acinclude.m4 b/acinclude.m4 index 11ba6fda4..2d2ab4d7c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -204,7 +204,7 @@ define(GNUPG_CHECK_RDYNAMIC, CFLAGS_RDYNAMIC="-Wl,-dy" ;; - freebsd2* | osf4* ) + openbsd* | freebsd2* | osf4* ) CFLAGS_RDYNAMIC="" ;; * ) @@ -404,7 +404,7 @@ case "$host_os" in aix*) ac_symcode='[BCDTU]' ;; -sunos* | cygwin32* | mingw32*) +openbsd* | sunos* | cygwin32* | mingw32*) ac_sympat='_\([_A-Za-z][_A-Za-z0-9]*\)' ac_symxfrm='_\1 \1' ;; diff --git a/doc/DETAILS b/doc/DETAILS index 27a8d9d4b..618c2a0e4 100644 --- a/doc/DETAILS +++ b/doc/DETAILS @@ -108,9 +108,16 @@ more arguments in future versions. NEED_PASSPHRASE <long keyid> Issued whenever a passphrase is needed. + NEED_PASSPHRASE_SYM <cipher_algo> <s2k_mode> <s2k_hash> + Issued whenever a passphrase for symmetric encryption is needed. + BAD_PASSPHRASE <long keyid> The supplied passphrase was wrong + DECRYPTION_FAILED + The symmetric decryption failed - one reason could be a wrong + passphrase for a symmetrical encrypted message. + NO_PUBKEY <long keyid> NO_SECKEY <long keyid> The key is not available diff --git a/g10/ChangeLog b/g10/ChangeLog index c2885b4e1..217367ec9 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +Thu Apr 8 09:35:53 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> + + * mainproc.c (proc_encrypted): Add a new status output + * passphrase.c (passphrase_to_dek): Ditto. + * status.h status.c: Add new status tokens. + Wed Apr 7 20:51:39 CEST 1999 Werner Koch <wk@isil.d.shuttle.de> * encr-data.c (decrypt_data): Fixes for 128 bit blocksize diff --git a/g10/mainproc.c b/g10/mainproc.c index bb78f4b4e..45acb3838 100644 --- a/g10/mainproc.c +++ b/g10/mainproc.c @@ -245,6 +245,7 @@ proc_encrypted( CTX c, PACKET *pkt ) log_info(_("decryption okay\n")); } else { + write_status( STATUS_DECRYPTION_FAILED ); log_error(_("decryption failed: %s\n"), g10_errstr(result)); /* FIXME: if this is secret key not available, try with * other keys */ diff --git a/g10/passphrase.c b/g10/passphrase.c index 6da528015..3cc8e009d 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -133,14 +133,20 @@ passphrase_to_dek( u32 *keyid, int cipher_algo, STRING2KEY *s2k, int mode ) :DEFAULT_DIGEST_ALGO; } - if( keyid && !next_pw && is_status_enabled() ) { + if( !next_pw && is_status_enabled() ) { char buf[50]; - sprintf( buf, "%08lX%08lX", (ulong)keyid[0], (ulong)keyid[1] ); - if( keyid[2] && keyid[3] && keyid[0] != keyid[2] - && keyid[1] != keyid[3] ) - sprintf( buf+strlen(buf), " %08lX%08lX", - (ulong)keyid[2], (ulong)keyid[3] ); - write_status_text( STATUS_NEED_PASSPHRASE, buf ); + if( keyid ) { + sprintf( buf, "%08lX%08lX", (ulong)keyid[0], (ulong)keyid[1] ); + if( keyid[2] && keyid[3] && keyid[0] != keyid[2] + && keyid[1] != keyid[3] ) + sprintf( buf+strlen(buf), " %08lX%08lX", + (ulong)keyid[2], (ulong)keyid[3] ); + write_status_text( STATUS_NEED_PASSPHRASE, buf ); + } + else { + sprintf( buf, "%d %d %d", cipher_algo, s2k->mode, s2k->hash_algo ); + write_status_text( STATUS_NEED_PASSPHRASE_SYM, buf ); + } } if( keyid && !opt.batch && !next_pw ) { diff --git a/g10/status.c b/g10/status.c index 1b6dc1095..889c63b0c 100644 --- a/g10/status.c +++ b/g10/status.c @@ -104,6 +104,8 @@ write_status_text ( int no, const char *text) case STATUS_BAD_PASSPHRASE : s = "BAD_PASSPHRASE\n"; break; case STATUS_NO_PUBKEY : s = "NO_PUBKEY\n"; break; case STATUS_NO_SECKEY : s = "NO_SECKEY\n"; break; + case STATUS_NEED_PASSPHRASE_SYM: s = "NEED_PASSPHRASE_SYM\n"; break; + case STATUS_DECRYPTION_FAILED: s = "DECRYPTION_FAILED\n"; break; default: s = "?\n"; break; } diff --git a/g10/status.h b/g10/status.h index 7beb32123..a4622f817 100644 --- a/g10/status.h +++ b/g10/status.h @@ -55,6 +55,8 @@ #define STATUS_BAD_PASSPHRASE 25 #define STATUS_NO_PUBKEY 26 #define STATUS_NO_SECKEY 27 +#define STATUS_NEED_PASSPHRASE_SYM 28 +#define STATUS_DECRYPTION_FAILED 29 /*-- status.c --*/ void set_status_fd ( int fd ); |