summaryrefslogtreecommitdiffstats
path: root/ffi
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
parent009bb9b5267930b4898240d5405d73df81b9ae22 (diff)
openpgp-ffi: Use generated to_string() function.
Diffstat (limited to 'ffi')
-rw-r--r--ffi/examples/configure.c4
-rw-r--r--ffi/examples/keyserver.c6
-rw-r--r--ffi/lang/python/sequoia/error.py2
-rw-r--r--ffi/src/lib.rs2
4 files changed, 7 insertions, 7 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);
diff --git a/ffi/lang/python/sequoia/error.py b/ffi/lang/python/sequoia/error.py
index 192b7d18..0b434801 100644
--- a/ffi/lang/python/sequoia/error.py
+++ b/ffi/lang/python/sequoia/error.py
@@ -23,7 +23,7 @@ class MalformedValue(Error, ValueError):
class SQError(Error):
def __init__(self, o):
self.__o = ffi.gc(o, lib.pgp_error_free)
- super(SQError, self).__init__(sq_str(lib.pgp_error_string(self.__o)))
+ super(SQError, self).__init__(sq_str(lib.pgp_error_to_string(self.__o)))
class Success(SQError):
pass
diff --git a/ffi/src/lib.rs b/ffi/src/lib.rs
index 8c88b836..2a75e89d 100644
--- a/ffi/src/lib.rs
+++ b/ffi/src/lib.rs
@@ -100,7 +100,7 @@
//!
//! tpk = pgp_tpk_from_file (&err, "../openpgp/tests/data/keys/testy.pgp");
//! if (tpk == NULL)
-//! error (1, 0, "pgp_tpk_from_bytes: %s", pgp_error_string (err));
+//! error (1, 0, "pgp_tpk_from_bytes: %s", pgp_error_to_string (err));
//!
//! pgp_tpk_free (tpk);
//! ```