src/pgp_gpg.h
author Volker Birk <vb@pep-project.org>
Tue, 21 Apr 2015 15:19:47 +0200
changeset 214 79333debeee0
parent 211 a022e853f81e
child 507 288496838ffb
permissions -rw-r--r--
checking if own key is expired and renew it
on demand
     1 #pragma once
     2 
     3 #include "pEpEngine.h"
     4 
     5 PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
     6 void pgp_release(PEP_SESSION session, bool out_last);
     7 
     8 PEP_STATUS pgp_decrypt_and_verify(
     9         PEP_SESSION session, const char *ctext, size_t csize,
    10         char **ptext, size_t *psize, stringlist_t **keylist
    11     );
    12 
    13 PEP_STATUS pgp_encrypt_and_sign(
    14         PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
    15         size_t psize, char **ctext, size_t *csize
    16     );
    17 
    18 PEP_STATUS pgp_verify_text(
    19         PEP_SESSION session, const char *text, size_t size,
    20         const char *signature, size_t sig_size, stringlist_t **keylist
    21     );
    22 
    23 PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
    24 
    25 PEP_STATUS pgp_export_keydata(
    26         PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    27     );
    28 
    29 PEP_STATUS pgp_find_keys(
    30         PEP_SESSION session, const char *pattern, stringlist_t **keylist
    31     );
    32 
    33 PEP_STATUS pgp_generate_keypair(
    34         PEP_SESSION session, pEp_identity *identity
    35     );
    36 
    37 PEP_STATUS pgp_get_key_rating(
    38         PEP_SESSION session,
    39         const char *fpr,
    40         PEP_comm_type *comm_type
    41     );
    42 
    43 PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
    44         size_t size);
    45 
    46 PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
    47 PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
    48 
    49 PEP_STATUS pgp_renew_key(
    50         PEP_SESSION session,
    51         const char *fpr,
    52         const timestamp *ts
    53     );
    54 
    55 PEP_STATUS pgp_revoke_key(
    56         PEP_SESSION session,
    57         const char *fpr,
    58         const char *reason
    59     );
    60 
    61 PEP_STATUS pgp_key_expired(
    62         PEP_SESSION session,
    63         const char *fpr,
    64         bool *expired
    65     );
    66