mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Print info about the used AEAD algorithm.
* g10/misc.c (openpgp_cipher_algo_mode_name): New. * g10/decrypt-data.c (decrypt_data): Use function here. -- With out this change we would see gpg: cipher algorithm 'AES256' may not be used in --compliance=de-vs mode This is confusing because AES256 is compliant. Now we see gpg: cipher algorithm 'AES256.OCB' may not be used in --compliance=de-vs mode which gives a hint on the problem.
This commit is contained in:
parent
c145366549
commit
15eda7ce78
3 changed files with 22 additions and 2 deletions
18
g10/misc.c
18
g10/misc.c
|
@ -608,6 +608,24 @@ openpgp_cipher_algo_name (cipher_algo_t algo)
|
|||
}
|
||||
|
||||
|
||||
/* Same as openpgp_cipher_algo_name but returns a string in the form
|
||||
* "ALGO.MODE" if AEAD is not 0. Note that in this version we do not
|
||||
* print "ALGO.CFB" as we do in 2.3 to avoid confusing users. */
|
||||
const char *
|
||||
openpgp_cipher_algo_mode_name (cipher_algo_t algo, aead_algo_t aead)
|
||||
{
|
||||
|
||||
if (aead == AEAD_ALGO_NONE)
|
||||
return openpgp_cipher_algo_name (algo);
|
||||
|
||||
return map_static_strings ("openpgp_cipher_algo_mode_name", algo, aead,
|
||||
openpgp_cipher_algo_name (algo),
|
||||
".",
|
||||
openpgp_aead_algo_name (aead),
|
||||
NULL);
|
||||
}
|
||||
|
||||
|
||||
/* Return 0 if ALGO is supported. Return an error if not. */
|
||||
gpg_error_t
|
||||
openpgp_aead_test_algo (aead_algo_t algo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue