summaryrefslogtreecommitdiffstats
path: root/openpgp-ffi/include/sequoia/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-05-25 13:20:15 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-05-28 11:52:26 +0200
commit271280e62d1e0ee64a8f4cbb5766b17e3edf947d (patch)
treed30a6172c9626e6fb36db62f336bd7d80abce819 /openpgp-ffi/include/sequoia/openpgp
parent94dcb41c69c4e16f1f491a9b27148e90a0d713e7 (diff)
openpgp: Change the `decrypt` proxy in the decryption helper.
- Returning rich errors from this function may compromise secret key material due to Bleichenbacher-style attacks. Change the API to prevent this. - Hat tip to Hanno Böck. - Fixes #507.
Diffstat (limited to 'openpgp-ffi/include/sequoia/openpgp')
-rw-r--r--openpgp-ffi/include/sequoia/openpgp/types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp/types.h b/openpgp-ffi/include/sequoia/openpgp/types.h
index b77e4251..216c69cb 100644
--- a/openpgp-ffi/include/sequoia/openpgp/types.h
+++ b/openpgp-ffi/include/sequoia/openpgp/types.h
@@ -1,6 +1,8 @@
#ifndef SEQUOIA_OPENPGP_TYPES_H
#define SEQUOIA_OPENPGP_TYPES_H
+#include <stdbool.h>
+
/*/
/// Holds a session key.
///
@@ -524,7 +526,7 @@ typedef pgp_status_t (*pgp_decryptor_get_certs_cb_t) (void *,
pgp_cert_t **, size_t *,
void (**free)(void *));
-typedef pgp_status_t (pgp_decryptor_do_decrypt_cb_t) (
+typedef bool (pgp_decryptor_do_decrypt_cb_t) (
void *,
uint8_t,
pgp_session_key_t);