[][src]Module sequoia_ffi::net

For accessing keys over the network.

Currently, this module provides access to keyservers providing the HKP protocol.

Examples

We provide a very reasonable default key server backed by hkps.pool.sks-keyservers.net, the subset of the SKS keyserver network that uses https to protect integrity and confidentiality of the communication with the client:

#include <sequoia.h>

sq_context_t ctx;
pgp_keyid_t id;
sq_keyserver_t ks;
pgp_cert_t cert;

ctx = sq_context_new (NULL);
ks = sq_keyserver_keys_openpgp_org (ctx);
id = pgp_keyid_from_bytes ((uint8_t *) "\x24\x7F\x6D\xAB\xC8\x49\x14\xFE");
cert = sq_keyserver_get (ctx, ks, id);

pgp_cert_free (cert);
pgp_keyid_free (id);
sq_keyserver_free (ks);
sq_context_free (ctx);

Functions

sq_keyserver_free

Frees a keyserver object.

sq_keyserver_get

Retrieves the key with the given keyid.

sq_keyserver_keys_openpgp_org

Returns a handle for keys.openpgp.org.

sq_keyserver_new

Returns a handle for the given URI.

sq_keyserver_send

Sends the given key to the server.

sq_keyserver_with_cert

Returns a handle for the given URI.