mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
sm: Handle gcry_pk_encrypt return value.
* sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt. -- Thanks to Sami Farin. GnuPG-bug-id: 2154 (backport commit of 4ee881bff4c8fdfa4b3b7a4b7afab611471e97f1)
This commit is contained in:
parent
8729f35510
commit
b508af2b2c
@ -208,8 +208,11 @@ encrypt_dek (const DEK dek, ksba_cert_t cert, unsigned char **encval)
|
||||
gcry_sexp_release (s_pkey);
|
||||
|
||||
/* Reformat it. */
|
||||
rc = make_canon_sexp (s_ciph, encval, NULL);
|
||||
gcry_sexp_release (s_ciph);
|
||||
if (!rc)
|
||||
{
|
||||
rc = make_canon_sexp (s_ciph, encval, NULL);
|
||||
gcry_sexp_release (s_ciph);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user