diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-03-18 16:33:51 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-03-25 19:00:49 +0100 |
commit | aa3004990403860a9a0261354e384e5ce8bdf1ed (patch) | |
tree | d59aeb8cc760a7adc8c4e7c0189182eb76f74822 /openpgp-ffi/include/sequoia/openpgp | |
parent | f572bc851d520a56eebb0a6cea38144051168a8a (diff) |
openpgp: Rework the DecryptionHelper trait.
- Simplify the protocol by removing the iteration. Instead, the
callee gets a proxy for PacketParser::decrypt() that she can use
to decrypt the message. If successful, the session key can be
cached without involving the DecryptionHelper trait. This also
allows us to dump session keys.
- Fixes #219.
Diffstat (limited to 'openpgp-ffi/include/sequoia/openpgp')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp/types.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp/types.h b/openpgp-ffi/include/sequoia/openpgp/types.h index 2ba7fcdc..140554f5 100644 --- a/openpgp-ffi/include/sequoia/openpgp/types.h +++ b/openpgp-ffi/include/sequoia/openpgp/types.h @@ -455,8 +455,6 @@ typedef enum pgp_encryption_mode { PGP_ENCRYPTION_MODE_FOR_TRANSPORT = 1, } pgp_encryption_mode_t; -typedef struct pgp_secret *pgp_secret_t; - typedef struct pgp_verification_results *pgp_verification_results_t; typedef struct pgp_verification_result *pgp_verification_result_t; @@ -475,10 +473,17 @@ typedef pgp_status_t (*pgp_decryptor_get_public_keys_cb_t) (void *, pgp_tpk_t **, size_t *, void (**free)(void *)); -typedef pgp_status_t (*pgp_decryptor_get_secret_keys_cb_t) (void *, +typedef pgp_status_t (pgp_decryptor_do_decrypt_cb_t) ( + void *, + uint8_t, + pgp_session_key_t); + +typedef pgp_status_t (*pgp_decryptor_decrypt_cb_t) (void *, pgp_pkesk_t *, size_t, pgp_skesk_t *, size_t, - pgp_secret_t *); + pgp_decryptor_do_decrypt_cb_t *, + void *, + pgp_fingerprint_t *); typedef pgp_status_t (*pgp_decryptor_check_signatures_cb_t) (void *, pgp_verification_results_t, |