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
4 // generate conditions and actions
6 // Copyleft (c) 2017, 2018, p≡p foundation
8 // Written by Volker Birk
13 decl _func *name (*type) alias - {
14 template %name=*name, %type=*type, "%type[@name='%name']"
15 call *type with "content" content;
18 decl condition is _func (*type="condition");
19 decl action is _func (*type="action");
20 decl timeout is _func (*type="fsm");
23 include standardlib.ysl2
24 include ./functions.ysl2
26 include ./cond_act_*.yml2
28 template "/protocol" {
29 document "generated/{@name}_actions.c", "text" {
31 // This file is under GNU General Public License 3.0
34 #include "pEp_internal.h"
37 #include "«@name»_impl.h"
38 `` for "fsm" | #include "«@name»_fsm.h"
40 static bool _TID_greater(TID_t *t1, TID_t *t2)
48 if (t1->size > t2->size)
50 if (t2->size > t1->size)
53 for (int i=0; i<t1->size; i++) {
54 if (t1->buf[i] > t2->buf[i])
56 if (t2->buf[i] > t1->buf[i])
64 apply "func:distinctName(//condition)", 0;
65 apply "func:distinctName(//action)", 0;
66 apply "/protocol/fsm", 0;
70 template "condition" | #error condition «@name» not implemented\n
71 template "action" | #error action «@name» not implemented\n
73 function "condition" {
76 PEP_STATUS «@name»(PEP_SESSION session, bool *result)
78 assert(session && result);
79 if (!(session && result))
80 return PEP_ILLEGAL_VALUE;
95 PEP_STATUS «@name»(PEP_SESSION session)
99 return PEP_ILLEGAL_VALUE;
105 return PEP_STATUS_OK;
114 PEP_STATUS «@name»TimeoutHandler(PEP_SESSION session)
118 return PEP_ILLEGAL_VALUE;
124 return PEP_STATUS_OK;