src/transport.c
author us@chu.huenfield.org
Tue, 25 Dec 2018 14:46:45 +0100
branchsync
changeset 3209 c15b4ca2b52a
parent 3121 f33a2ae77177
child 4792 7056435ab9e7
permissions -rw-r--r--
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
     2 // see LICENSE.txt
     3 
     4 #include "pEp_internal.h"
     5 #include "trans_auto.h"
     6 
     7 #include <memory.h>
     8 #include <assert.h>
     9 
    10 PEP_transport_t transports[PEP_trans__count];
    11     
    12 PEP_STATUS init_transport_system(PEP_SESSION session, bool in_first)
    13 {
    14     assert(session);
    15     session->transports = transports;
    16 
    17     if (in_first) {
    18         assert(PEP_trans__count == 1);
    19         memset(transports, 0, sizeof(PEP_transport_t) * PEP_trans__count);
    20 
    21         transports[PEP_trans_auto].id = PEP_trans_auto;
    22         transports[PEP_trans_auto].sendto = auto_sendto;
    23         transports[PEP_trans_auto].readnext = auto_readnext;
    24     }
    25 
    26     return PEP_STATUS_OK;
    27 }
    28 
    29 void release_transport_system(PEP_SESSION session, bool out_last)
    30 {
    31     assert(session);
    32     // nothing yet
    33 }
    34