summaryrefslogtreecommitdiffstats
path: root/ffi/examples
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-01-29 15:44:42 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-01-29 17:41:26 +0100
commit6b06c05cb99d2e7396fdf3d3d1c2e6f92d954dad (patch)
tree2e85b193992224fcca9cfea358b70118ab2f5378 /ffi/examples
parent009bb9b5267930b4898240d5405d73df81b9ae22 (diff)
openpgp-ffi: Use generated to_string() function.
Diffstat (limited to 'ffi/examples')
-rw-r--r--ffi/examples/configure.c4
-rw-r--r--ffi/examples/keyserver.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/ffi/examples/configure.c b/ffi/examples/configure.c
index 9e986613..38b15c05 100644
--- a/ffi/examples/configure.c
+++ b/ffi/examples/configure.c
@@ -20,14 +20,14 @@ main (int argc, char **argv)
ctx = sq_config_build (cfg, &err);
if (ctx == NULL)
error (1, 0, "Initializing sequoia failed: %s",
- pgp_error_string (err));
+ pgp_error_to_string (err));
ks = sq_keyserver_sks_pool (ctx);
if (ks == NULL)
{
pgp_error_t err = sq_context_last_error (ctx);
assert (pgp_error_status (err) == PGP_STATUS_NETWORK_POLICY_VIOLATION);
- char *msg = pgp_error_string (err);
+ char *msg = pgp_error_to_string (err);
error (0, 0, "Initializing KeyServer failed as expected: %s",
msg);
free (msg);
diff --git a/ffi/examples/keyserver.c b/ffi/examples/keyserver.c
index 204e52ae..f7437472 100644
--- a/ffi/examples/keyserver.c
+++ b/ffi/examples/keyserver.c
@@ -18,13 +18,13 @@ main (int argc, char **argv)
ctx = sq_context_new ("org.sequoia-pgp.example", &err);
if (ctx == NULL)
error (1, 0, "Initializing sequoia failed: %s",
- pgp_error_string (err));
+ pgp_error_to_string (err));
ks = sq_keyserver_sks_pool (ctx);
if (ks == NULL)
{
pgp_error_t err = sq_context_last_error (ctx);
- error (1, 0, "Initializing Keyserver failed: %s", pgp_error_string (err));
+ error (1, 0, "Initializing Keyserver failed: %s", pgp_error_to_string (err));
}
id = pgp_keyid_from_bytes ((uint8_t *) "\x24\x7F\x6D\xAB\xC8\x49\x14\xFE");
@@ -32,7 +32,7 @@ main (int argc, char **argv)
if (tpk == NULL)
{
pgp_error_t err = sq_context_last_error (ctx);
- error (1, 0, "Failed to retrieve key: %s", pgp_error_string (err));
+ error (1, 0, "Failed to retrieve key: %s", pgp_error_to_string (err));
}
char *debug = pgp_tpk_debug (tpk);