src/pgp_netpgp.h
author Krista Grothoff <krista@pep-project.org>
Sat, 24 Sep 2016 18:09:18 +0200
branchENGINE-27
changeset 1185 4b01328f3cf2
parent 1033 67e21fb43c77
child 1057 abff13590a4c
child 1126 129b561095a6
permissions -rw-r--r--
ENGINE-27: update_identity no longer pays attention to the input identity's fpr, but pulls one from elect_pubkey.
     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_list_keyinfo(
    34     PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list
    35     );
    36 
    37 PEP_STATUS pgp_generate_keypair(
    38         PEP_SESSION session, pEp_identity *identity
    39     );
    40 
    41 PEP_STATUS pgp_get_key_rating(
    42         PEP_SESSION session,
    43         const char *fpr,
    44         PEP_comm_type *comm_type
    45     );
    46 
    47 PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
    48         size_t size);
    49 
    50 PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
    51 PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
    52 
    53 PEP_STATUS pgp_renew_key(
    54         PEP_SESSION session,
    55         const char *fpr,
    56         const timestamp *ts
    57     );
    58 
    59 PEP_STATUS pgp_revoke_key(
    60         PEP_SESSION session,
    61         const char *fpr,
    62         const char *reason
    63     );
    64 
    65 PEP_STATUS pgp_key_expired(
    66         PEP_SESSION session,
    67         const char *fpr,
    68         const time_t when,
    69         bool *expired
    70     );
    71 
    72 PEP_STATUS pgp_key_revoked(
    73         PEP_SESSION session,
    74         const char *fpr,
    75         bool *revoked
    76     );