mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Use only OpenPGP cipher algo ids.
* g10/misc.c (map_cipher_openpgp_to_gcry): Use explicit mapping and use enums for the arg and return value. (map_cipher_gcry_to_openpgp): Ditto. (openpgp_cipher_blocklen): Use constant macros. (openpgp_cipher_test_algo): Use mapping function and prepare to disable algorithms. (openpgp_cipher_algo_name): Do not use Libgcrypt. * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Replace CGRY_CIPHER_* by CIPHER_ALGO_*. * common/openpgpdefs.h (cipher_algo_t): Remove unused CIPHER_ALGO_DUMMY. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
b7f8dec632
commit
16a6311ade
4 changed files with 87 additions and 36 deletions
|
@ -183,9 +183,9 @@ pk_ecdh_encrypt_with_shared_point (int is_encrypt, gcry_mpi_t shared_mpi,
|
|||
xfree (secret_x);
|
||||
return gpg_error (GPG_ERR_BAD_PUBKEY);
|
||||
}
|
||||
if (kdf_encr_algo != GCRY_CIPHER_AES128
|
||||
&& kdf_encr_algo != GCRY_CIPHER_AES192
|
||||
&& kdf_encr_algo != GCRY_CIPHER_AES256)
|
||||
if (kdf_encr_algo != CIPHER_ALGO_AES
|
||||
&& kdf_encr_algo != CIPHER_ALGO_AES192
|
||||
&& kdf_encr_algo != CIPHER_ALGO_AES256)
|
||||
{
|
||||
xfree (secret_x);
|
||||
return gpg_error (GPG_ERR_BAD_PUBKEY);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue