Home GnuPG
Diffusion GnuPG 74258278efac

common, g10: Fix enumeration types.

Description

common, g10: Fix enumeration types.

* common/openpgpdefs.h (CIPHER_ALGO_PRIVATE10, PUBKEY_ALGO_PRIVATE10)
(DIGEST_ALGO_PRIVATE10, COMPRESS_ALGO_PRIVATE10): New.
* g10/misc.c (map_pk_gcry_to_openpgp): Add type conversion.
(map_cipher_openpgp_to_gcry, openpgp_cipher_algo_name)
(openpgp_pk_test_algo2, map_md_openpgp_to_gcry)
(pubkey_get_npkey): Add default handling.

Compilers may emit code assuming the maximum value of enum type.
According to OpenPGP specification, there are cases for private uses.

  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Apr 13 2017, 5:54 AM
Parents
rG5af104b541ed: dirmngr: More fix for Windows.
Branches
Unknown
Tags
Unknown