mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
Add a DECRYPTION_INFO status.
DECRYPTION_INFO <mdc_method> <sym_algo> Print information about the symmetric encryption algorithm and the MDC method. This will be emitted even if the decryption fails.
This commit is contained in:
parent
71e7a1644e
commit
5667e33290
@ -1,5 +1,7 @@
|
|||||||
2011-02-03 Werner Koch <wk@g10code.com>
|
2011-02-03 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* status.h (STATUS_DECRYPTION_INFO): New.
|
||||||
|
|
||||||
* argparse.c (strusage): Update copyright year.
|
* argparse.c (strusage): Update copyright year.
|
||||||
|
|
||||||
2011-01-31 Werner Koch <wk@g10code.com>
|
2011-01-31 Werner Koch <wk@g10code.com>
|
||||||
|
@ -49,6 +49,7 @@ enum
|
|||||||
STATUS_NO_PUBKEY,
|
STATUS_NO_PUBKEY,
|
||||||
STATUS_NO_SECKEY,
|
STATUS_NO_SECKEY,
|
||||||
STATUS_NEED_PASSPHRASE_SYM,
|
STATUS_NEED_PASSPHRASE_SYM,
|
||||||
|
STATUS_DECRYPTION_INFO,
|
||||||
STATUS_DECRYPTION_FAILED,
|
STATUS_DECRYPTION_FAILED,
|
||||||
STATUS_DECRYPTION_OKAY,
|
STATUS_DECRYPTION_OKAY,
|
||||||
STATUS_MISSING_PASSPHRASE,
|
STATUS_MISSING_PASSPHRASE,
|
||||||
|
28
doc/DETAILS
28
doc/DETAILS
@ -423,17 +423,6 @@ more arguments in future versions.
|
|||||||
The supplied passphrase was good and the secret key material
|
The supplied passphrase was good and the secret key material
|
||||||
is therefore usable.
|
is therefore usable.
|
||||||
|
|
||||||
DECRYPTION_FAILED
|
|
||||||
The symmetric decryption failed - one reason could be a wrong
|
|
||||||
passphrase for a symmetrical encrypted message.
|
|
||||||
|
|
||||||
DECRYPTION_OKAY
|
|
||||||
The decryption process succeeded. This means, that either the
|
|
||||||
correct secret key has been used or the correct passphrase
|
|
||||||
for a conventional encrypted message was given. The program
|
|
||||||
itself may return an errorcode because it may not be possible to
|
|
||||||
verify a signature for some reasons.
|
|
||||||
|
|
||||||
NO_PUBKEY <long keyid>
|
NO_PUBKEY <long keyid>
|
||||||
NO_SECKEY <long keyid>
|
NO_SECKEY <long keyid>
|
||||||
The key is not available
|
The key is not available
|
||||||
@ -485,6 +474,22 @@ more arguments in future versions.
|
|||||||
Mark the start and end of the actual decryption process. These
|
Mark the start and end of the actual decryption process. These
|
||||||
are also emitted when in --list-only mode.
|
are also emitted when in --list-only mode.
|
||||||
|
|
||||||
|
DECRYPTION_INFO <mdc_method> <sym_algo>
|
||||||
|
Print information about the symmetric encryption algorithm and
|
||||||
|
the MDC method. This will be emitted even if the decryption
|
||||||
|
fails.
|
||||||
|
|
||||||
|
DECRYPTION_FAILED
|
||||||
|
The symmetric decryption failed - one reason could be a wrong
|
||||||
|
passphrase for a symmetrical encrypted message.
|
||||||
|
|
||||||
|
DECRYPTION_OKAY
|
||||||
|
The decryption process succeeded. This means, that either the
|
||||||
|
correct secret key has been used or the correct passphrase
|
||||||
|
for a conventional encrypted message was given. The program
|
||||||
|
itself may return an errorcode because it may not be possible to
|
||||||
|
verify a signature for some reasons.
|
||||||
|
|
||||||
BEGIN_ENCRYPTION <mdc_method> <sym_algo>
|
BEGIN_ENCRYPTION <mdc_method> <sym_algo>
|
||||||
END_ENCRYPTION
|
END_ENCRYPTION
|
||||||
Mark the start and end of the actual encryption process.
|
Mark the start and end of the actual encryption process.
|
||||||
@ -1290,4 +1295,3 @@ A better way to do this would be a request like:
|
|||||||
This can be implemented using Hurd's translator mechanism.
|
This can be implemented using Hurd's translator mechanism.
|
||||||
However, I think the whole key server stuff has to be re-thought;
|
However, I think the whole key server stuff has to be re-thought;
|
||||||
I have some ideas and probably create a white paper.
|
I have some ideas and probably create a white paper.
|
||||||
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
2011-02-03 Werner Koch <wk@g10code.com>
|
2011-02-03 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* decrypt-data.c: Include status.h.
|
||||||
|
(decrypt_data): Emit a DECRYPTION_INFO status line.
|
||||||
|
|
||||||
* misc.c (has_invalid_email_chars): Relax mailbox name checking.
|
* misc.c (has_invalid_email_chars): Relax mailbox name checking.
|
||||||
Fixes bug#1315.
|
Fixes bug#1315.
|
||||||
|
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#include "cipher.h"
|
#include "cipher.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "i18n.h"
|
#include "i18n.h"
|
||||||
|
#include "status.h"
|
||||||
|
|
||||||
|
|
||||||
static int mdc_decode_filter ( void *opaque, int control, IOBUF a,
|
static int mdc_decode_filter ( void *opaque, int control, IOBUF a,
|
||||||
@ -97,6 +98,14 @@ decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
|
|||||||
log_info (_("encrypted with unknown algorithm %d\n"), dek->algo );
|
log_info (_("encrypted with unknown algorithm %d\n"), dek->algo );
|
||||||
dek->algo_info_printed = 1;
|
dek->algo_info_printed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
char buf[20];
|
||||||
|
|
||||||
|
snprintf (buf, sizeof buf, "%d %d", ed->mdc_method, dek->algo);
|
||||||
|
write_status_text (STATUS_DECRYPTION_INFO, buf);
|
||||||
|
}
|
||||||
|
|
||||||
rc = openpgp_cipher_test_algo (dek->algo);
|
rc = openpgp_cipher_test_algo (dek->algo);
|
||||||
if (rc)
|
if (rc)
|
||||||
goto leave;
|
goto leave;
|
||||||
@ -443,4 +452,3 @@ decode_filter( void *opaque, int control, IOBUF a, byte *buf, size_t *ret_len)
|
|||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user