Replace use of Sequoia's backend with a custom key store.
- Sequoia's key store doesn't meet pep's needs (in particular, the
ability to search on a key's user id) and trying to shoehorn pep's
needs onto Sequoia's key store abstractions is just introducing
overhead with no appreciable gain in functionality.
- This patch changes the Sequoia backend to use a local sqlite
database to store the public keys.
1 // This file is under GNU General Public License 3.0
9 #include "keymanagement.h"
11 #include "message_api.h"
12 #include "cryptotech.h"
18 // key_reset() - reset the database status for a key, removing all trust information
19 // and default database connections. For own keys, also revoke the key
20 // and communicate the revocation and new key to partners we have sent
21 // mail to recently from the specific identity (i.e. address/user_id)
22 // that contacted them. We also in this case set up information so that
23 // if someone we mail uses the wrong key and wasn't yet contacted,
24 // we can send them the reset information from the right address.
26 // Can be called manually or through another protocol.
29 // session (in) session handle
30 // fpr (in) fingerprint of key to reset. If NULL and ident is NULL,
31 // we reset all keys for the own user. If NULL and ident is
32 // an own identity, we reset the default key for that
33 // identity. If that own identity has no default key, we
34 // reset the user default.
35 // if it is NULL and there is a non-own identity, this is
36 // currently undefined and will return an error. Later, we
37 // may decide on semantics for it (e.g. remove all keys
38 // in the DB for that identity)
39 // ident (in) identity for which the key reset should occur.
40 // if NULL and fpr is non-NULL, we'll reset the key for all
41 // associated identities. If both ident and fpr are NULL, see
42 // the fpr arg documentation.
44 // Note: ident->fpr is always ignored
47 DYNAMIC_API PEP_STATUS key_reset(
53 PEP_STATUS has_key_reset_been_sent(
56 const char* revoked_fpr,
59 PEP_STATUS set_reset_contact_notified(
61 const char* revoke_fpr,
62 const char* contact_id
65 PEP_STATUS receive_key_reset(PEP_SESSION session,
68 PEP_STATUS create_standalone_key_reset_message(PEP_SESSION session,
74 PEP_STATUS send_key_reset_to_recents(PEP_SESSION session,