diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-05-09 10:06:54 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-05-09 10:16:29 +0200 |
commit | 687255e17fd2c4fe6871735f896c9abc2a6c88c2 (patch) | |
tree | 66e2f314fb77886a150aa4738c004dd1661d2c4d /openpgp-ffi/include/sequoia/openpgp.h | |
parent | d09b7ff4003068f3f55c390f549bed3ee4013441 (diff) |
openpgp-ffi: Add some bindings for TPKParser
Diffstat (limited to 'openpgp-ffi/include/sequoia/openpgp.h')
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index f504c037..1df8909c 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -799,6 +799,38 @@ pgp_tpk_key_iter_t pgp_tpk_key_iter_valid (pgp_tpk_t tpk); /*/ char *pgp_tpk_primary_user_id(pgp_tpk_t tpk); +/*/ +/// Returns a TPKParser. +/// +/// A TPK parser parses a keyring, which is simply zero or more TPKs +/// concatenated together. +/*/ +pgp_tpk_parser_t pgp_tpk_parser_from_bytes(pgp_error_t *errp, + char *buf, size_t len); + +/*/ +/// Returns a TPKParser. +/// +/// A TPK parser parses a keyring, which is simply zero or more TPKs +/// concatenated together. +/*/ +pgp_tpk_parser_t pgp_tpk_parser_from_packet_parser(pgp_packet_parser_result_t ppr); + +/*/ +/// Returns the next TPK, if any. +/// +/// If there is an error parsing the TPK, it is returned in *errp. +/// +/// If this function returns NULL and does not set *errp, then the end +/// of the file was reached. +/*/ +pgp_tpk_t pgp_tpk_parser_next(pgp_error_t *errp, pgp_tpk_parser_t parser); + +/*/ +/// Frees an pgp_tpk_key_iter_t. +/*/ +void pgp_tpk_parser_free (pgp_tpk_parser_t parser); + /* TPKBuilder */ /*/ |