mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Allow decryption of symencr even for non-compliant cipher.
* g10/decrypt-data.c (decrypt_data): Add arg compliance_error. Adjust all callers. Fail on compliance error only in --require-compliance mode. Make sure to return an error if the buffer is missing; actually that should be an assert. * g10/mainproc.c (proc_encrypted): Delay printing of the compliance mode status. Consult the compliance error now returned by decrypt_data. -- The actual case here is that we fail hard if a message has been AEAD encrypted with one AEAD capable key and also with one passphrase. In general the preference system takes care of not using AEAD if one recipient's key does not support it. However, if the sender uses her own AEAD-capable key _and_ a passphrase the message will be AEAD encrypted. This change allows to decrypt that anyway along with a warning message. Note that this does currently not work in 2.3 due to a non-compliant libgcrypt. We will however, backport this to 2.2.
This commit is contained in:
parent
6d6438a361
commit
8631d4cfe2
5 changed files with 47 additions and 18 deletions
|
@ -914,8 +914,9 @@ gpg_error_t get_override_session_key (DEK *dek, const char *string);
|
|||
int handle_compressed (ctrl_t ctrl, void *ctx, PKT_compressed *cd,
|
||||
int (*callback)(iobuf_t, void *), void *passthru );
|
||||
|
||||
/*-- encr-data.c --*/
|
||||
int decrypt_data (ctrl_t ctrl, void *ctx, PKT_encrypted *ed, DEK *dek );
|
||||
/*-- decrypt-data.c --*/
|
||||
int decrypt_data (ctrl_t ctrl, void *ctx, PKT_encrypted *ed, DEK *dek,
|
||||
int *compliance_error);
|
||||
|
||||
/*-- plaintext.c --*/
|
||||
gpg_error_t get_output_file (const byte *embedded_name, int embedded_namelen,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue