diff options
Diffstat (limited to 'openpgp-ffi')
-rw-r--r-- | openpgp-ffi/examples/example.c | 8 | ||||
-rw-r--r-- | openpgp-ffi/examples/reader.c | 6 | ||||
-rw-r--r-- | openpgp-ffi/include/sequoia/openpgp.h | 4 | ||||
-rw-r--r-- | openpgp-ffi/src/tpk.rs | 9 |
4 files changed, 11 insertions, 16 deletions
diff --git a/openpgp-ffi/examples/example.c b/openpgp-ffi/examples/example.c index 4d00876d..c23b4381 100644 --- a/openpgp-ffi/examples/example.c +++ b/openpgp-ffi/examples/example.c @@ -1,8 +1,9 @@ #define _GNU_SOURCE -#include <error.h> #include <errno.h> +#include <error.h> #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> @@ -37,7 +38,10 @@ main (int argc, char **argv) if (tpk == NULL) error (1, 0, "pgp_tpk_from_bytes: %s", pgp_error_string (err)); - pgp_tpk_dump (tpk); + char *debug = pgp_tpk_debug (tpk); + printf ("%s", debug); + free (debug); + pgp_tpk_free (tpk); munmap (b, st.st_size); close (fd); diff --git a/openpgp-ffi/examples/reader.c b/openpgp-ffi/examples/reader.c index f8a69adf..125b0e37 100644 --- a/openpgp-ffi/examples/reader.c +++ b/openpgp-ffi/examples/reader.c @@ -3,6 +3,7 @@ #include <errno.h> #include <fcntl.h> #include <stdio.h> +#include <stdlib.h> #include <sys/mman.h> #include <sys/stat.h> #include <sys/types.h> @@ -39,7 +40,10 @@ main (int argc, char **argv) if (tpk == NULL) error (1, 0, "pgp_tpk_from_reader: %s", pgp_error_string (err)); - pgp_tpk_dump (tpk); + char *debug = pgp_tpk_debug (tpk); + printf ("%s", debug); + free (debug); + pgp_tpk_free (tpk); pgp_reader_free (reader); munmap (b, st.st_size); diff --git a/openpgp-ffi/include/sequoia/openpgp.h b/openpgp-ffi/include/sequoia/openpgp.h index bbb5c383..04616c17 100644 --- a/openpgp-ffi/include/sequoia/openpgp.h +++ b/openpgp-ffi/include/sequoia/openpgp.h @@ -889,10 +889,6 @@ pgp_tpk_t pgp_tpk_merge_packets (pgp_error_t *errp, pgp_tpk_t tpk, pgp_packet_t *packets, size_t packets_len); -/*/ -/// Dumps the TPK. -/*/ -void pgp_tpk_dump (const pgp_tpk_t tpk); /*/ /// Returns the fingerprint. diff --git a/openpgp-ffi/src/tpk.rs b/openpgp-ffi/src/tpk.rs index 8c381ba4..be2bd56d 100644 --- a/openpgp-ffi/src/tpk.rs +++ b/openpgp-ffi/src/tpk.rs @@ -169,15 +169,6 @@ pub extern "system" fn pgp_tpk_merge_packets(errp: Option<&mut *mut failure::Err ffi_try_box!(tpk.merge_packets(packets)) } -/// Dumps the TPK. -/// -/// XXX Remove this. -#[::ffi_catch_abort] #[no_mangle] -pub extern "system" fn pgp_tpk_dump(tpk: *const openpgp::TPK) { - let tpk = ffi_param_ref!(tpk); - println!("{:?}", *tpk); -} - /// Returns the fingerprint. #[::ffi_catch_abort] #[no_mangle] pub extern "system" fn pgp_tpk_fingerprint(tpk: *const openpgp::TPK) |