1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-05 23:07:49 +02: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
This commit is contained in:
NIIBE Yutaka 2015-12-15 12:38:25 +09:00
parent 7baca03307
commit 4ee881bff4

View File

@ -212,8 +212,11 @@ encrypt_dek (const DEK dek, ksba_cert_t cert, unsigned char **encval)
gcry_sexp_release (s_pkey); gcry_sexp_release (s_pkey);
/* Reformat it. */ /* Reformat it. */
rc = make_canon_sexp (s_ciph, encval, NULL); if (!rc)
gcry_sexp_release (s_ciph); {
rc = make_canon_sexp (s_ciph, encval, NULL);
gcry_sexp_release (s_ciph);
}
return rc; return rc;
} }