diff options
author | Werner Koch <wk@gnupg.org> | 2018-05-29 12:42:44 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-05-29 12:42:52 +0200 |
commit | 253e8bdd9014cbe6dc06adce9d9dd2f8f4b31709 (patch) | |
tree | ce2d7b23b0025145cfdf722d27a7501b81f9b0b7 /g10/pkclist.c | |
parent | gpg: Fix detection of the AEAD feature flag. (diff) | |
download | gnupg2-253e8bdd9014cbe6dc06adce9d9dd2f8f4b31709.tar.xz gnupg2-253e8bdd9014cbe6dc06adce9d9dd2f8f4b31709.zip |
gpg: Remove MDC options
* g10/gpg.c: Tuen options --force-mdc, --no-force-mdc, --disable-mdc
and --no-disable-mdc into NOPs.
* g10/encrypt.c (use_mdc): Simplify. MDC is now almost always used.
(use_aead): Ignore MDC options. Print warning for missing MDC feature
flags.
* g10/pkclist.c (warn_missing_mdc_from_pklist): Rename to ...
(warn_missing_aead_from_pklist): this and adjust.
--
The MDC is now always used except with --rfc2440 which will lead to a
a big fat warning.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c index 8b5d0422a..05bbea52d 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -1677,9 +1677,10 @@ select_aead_from_pklist (PK_LIST pk_list) } -/* Print a warning for all keys in PK_LIST missing the MDC feature. */ +/* Print a warning for all keys in PK_LIST missing the AEAD feature + * flag or AEAD algorithms. */ void -warn_missing_mdc_from_pklist (PK_LIST pk_list) +warn_missing_aead_from_pklist (PK_LIST pk_list) { PK_LIST pkr; @@ -1688,12 +1689,12 @@ warn_missing_mdc_from_pklist (PK_LIST pk_list) int mdc; if (pkr->pk->user_id) /* selected by user ID */ - mdc = pkr->pk->user_id->flags.mdc; + mdc = pkr->pk->user_id->flags.aead; else - mdc = pkr->pk->flags.mdc; + mdc = pkr->pk->flags.aead; if (!mdc) log_info (_("Note: key %s has no %s feature\n"), - keystr_from_pk (pkr->pk), "MDC"); + keystr_from_pk (pkr->pk), "AEAD"); } } |