1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpgsm: Avoid warnings due to enum conversions

* sm/decrypt.c (pwri_parse_pbkdf2): Use int instead of gcry_md_algos.
(pwri_decrypt): Ditto for gcry_cipher_algos.
This commit is contained in:
Werner Koch 2023-08-28 08:49:45 +02:00
parent dccc471de4
commit 87cebf4f8d
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -429,7 +429,7 @@ static gpg_error_t
pwri_parse_pbkdf2 (const unsigned char *der, size_t derlen, pwri_parse_pbkdf2 (const unsigned char *der, size_t derlen,
unsigned char const **r_salt, unsigned int *r_saltlen, unsigned char const **r_salt, unsigned int *r_saltlen,
unsigned long *r_iterations, unsigned long *r_iterations,
enum gcry_md_algos *r_digest) int *r_digest)
{ {
gpg_error_t err; gpg_error_t err;
size_t objlen, hdrlen; size_t objlen, hdrlen;
@ -541,7 +541,7 @@ pwri_decrypt (ctrl_t ctrl, gcry_sexp_t enc_val,
unsigned int ekeylen; unsigned int ekeylen;
unsigned char kek[32]; unsigned char kek[32];
unsigned int keklen; unsigned int keklen;
enum gcry_cipher_algos encr_algo; int encr_algo;
enum gcry_cipher_modes encr_mode; enum gcry_cipher_modes encr_mode;
gcry_cipher_hd_t encr_hd = NULL; gcry_cipher_hd_t encr_hd = NULL;
unsigned char *result = NULL; unsigned char *result = NULL;
@ -550,7 +550,7 @@ pwri_decrypt (ctrl_t ctrl, gcry_sexp_t enc_val,
const unsigned char *salt; /* Points int dparm. */ const unsigned char *salt; /* Points int dparm. */
unsigned int saltlen; unsigned int saltlen;
unsigned long iterations; unsigned long iterations;
enum gcry_md_algos digest_algo; int digest_algo;
char *passphrase = NULL; char *passphrase = NULL;