src/pgp_netpgp.h
author Krista Bennett <krista@pep-project.org>
Wed, 15 Mar 2017 18:02:46 +0100
changeset 1674 5639f969866a
parent 1513 e7f7e42385b5
child 1677 e02c53c94550
permissions -rw-r--r--
Added pgp_encrypt_only stubs for NetPGP
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 #pragma once
     5 
     6 #include "pEpEngine.h"
     7 
     8 PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
     9 void pgp_release(PEP_SESSION session, bool out_last);
    10 
    11 PEP_STATUS pgp_decrypt_and_verify(
    12         PEP_SESSION session, const char *ctext, size_t csize,
    13         const char *dsigtext, size_t dsigsize,
    14         char **ptext, size_t *psize, stringlist_t **keylist
    15     );
    16 
    17 PEP_STATUS pgp_encrypt_and_sign(
    18         PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
    19         size_t psize, char **ctext, size_t *csize
    20     );
    21 
    22 
    23 PEP_STATUS pgp_encrypt_only(
    24         PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
    25         size_t psize, char **ctext, size_t *csize
    26     );
    27 
    28 
    29 PEP_STATUS pgp_verify_text(
    30         PEP_SESSION session, const char *text, size_t size,
    31         const char *signature, size_t sig_size, stringlist_t **keylist
    32     );
    33 
    34 PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
    35 
    36 PEP_STATUS pgp_export_keydata(
    37         PEP_SESSION session, const char *fpr, char **key_data, size_t *size
    38     );
    39 
    40 PEP_STATUS pgp_find_keys(
    41         PEP_SESSION session, const char *pattern, stringlist_t **keylist
    42     );
    43 
    44 PEP_STATUS pgp_list_keyinfo(
    45     PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list
    46     );
    47 
    48 PEP_STATUS pgp_generate_keypair(
    49         PEP_SESSION session, pEp_identity *identity
    50     );
    51 
    52 PEP_STATUS pgp_get_key_rating(
    53         PEP_SESSION session,
    54         const char *fpr,
    55         PEP_comm_type *comm_type
    56     );
    57 
    58 PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
    59         size_t size);
    60 
    61 PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
    62 PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
    63 
    64 PEP_STATUS pgp_renew_key(
    65         PEP_SESSION session,
    66         const char *fpr,
    67         const timestamp *ts
    68     );
    69 
    70 PEP_STATUS pgp_revoke_key(
    71         PEP_SESSION session,
    72         const char *fpr,
    73         const char *reason
    74     );
    75 
    76 PEP_STATUS pgp_key_expired(
    77         PEP_SESSION session,
    78         const char *fpr,
    79         const time_t when,
    80         bool *expired
    81     );
    82 
    83 PEP_STATUS pgp_key_revoked(
    84         PEP_SESSION session,
    85         const char *fpr,
    86         bool *revoked
    87     );
    88 
    89 PEP_STATUS pgp_key_created(
    90         PEP_SESSION session,
    91         const char *fprstr,
    92         time_t *created
    93     );
    94 
    95 PEP_STATUS pgp_contains_priv_key(
    96     PEP_SESSION session,
    97     const char *fpr,
    98     bool *has_private);
    99 
   100 PEP_STATUS pgp_find_private_keys(
   101     PEP_SESSION session, const char *pattern, stringlist_t **keylist
   102 );