summaryrefslogtreecommitdiffstats
path: root/ffi/examples
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-01-15 09:35:04 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-01-15 11:34:49 +0100
commit59a59ac5bf9cc9be2698eb35376c3b58fd483252 (patch)
tree5eb5c8256c67b8397669c48fae905840c3302866 /ffi/examples
parentde5c18230ddcad3928ae5c4bd2c1badbe9ec2e92 (diff)
net: Decouple from core.
- Move core::NetworkPolicy to net::Policy, update all code accordingly.
Diffstat (limited to 'ffi/examples')
-rw-r--r--ffi/examples/configure.c4
-rw-r--r--ffi/examples/keyserver.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/ffi/examples/configure.c b/ffi/examples/configure.c
index ca3d781a..6551e196 100644
--- a/ffi/examples/configure.c
+++ b/ffi/examples/configure.c
@@ -25,13 +25,13 @@ main (int argc, char **argv)
sq_keyserver_t ks;
cfg = sq_context_configure ();
- sq_config_network_policy (cfg, SQ_NETWORK_POLICY_OFFLINE);
+ sq_config_home (cfg, "/tmp");
ctx = sq_config_build (cfg, &err);
if (ctx == NULL)
error (1, 0, "Initializing sequoia failed: %s",
pgp_error_to_string (err));
- ks = sq_keyserver_keys_openpgp_org (ctx);
+ ks = sq_keyserver_keys_openpgp_org (ctx, SQ_NETWORK_POLICY_OFFLINE);
if (ks == NULL)
{
pgp_error_t err = sq_context_last_error (ctx);
diff --git a/ffi/examples/keyserver.c b/ffi/examples/keyserver.c
index 64c90cdc..08624ea7 100644
--- a/ffi/examples/keyserver.c
+++ b/ffi/examples/keyserver.c
@@ -29,7 +29,7 @@ main (int argc, char **argv)
error (1, 0, "Initializing sequoia failed: %s",
pgp_error_to_string (err));
- ks = sq_keyserver_keys_openpgp_org (ctx);
+ ks = sq_keyserver_keys_openpgp_org (ctx, SQ_NETWORK_POLICY_ENCRYPTED);
if (ks == NULL)
{
pgp_error_t err = sq_context_last_error (ctx);