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
vb@1513
     1
// This file is under GNU General Public License 3.0
vb@1513
     2
// see LICENSE.txt
vb@1513
     3
Edouard@174
     4
#pragma once
Edouard@174
     5
Edouard@174
     6
#include "pEpEngine.h"
Edouard@174
     7
Edouard@174
     8
PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
Edouard@174
     9
void pgp_release(PEP_SESSION session, bool out_last);
Edouard@174
    10
Edouard@174
    11
PEP_STATUS pgp_decrypt_and_verify(
Edouard@174
    12
        PEP_SESSION session, const char *ctext, size_t csize,
krista@1435
    13
        const char *dsigtext, size_t dsigsize,
Edouard@174
    14
        char **ptext, size_t *psize, stringlist_t **keylist
Edouard@174
    15
    );
Edouard@174
    16
Edouard@174
    17
PEP_STATUS pgp_encrypt_and_sign(
Edouard@174
    18
        PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
Edouard@174
    19
        size_t psize, char **ctext, size_t *csize
Edouard@174
    20
    );
Edouard@174
    21
krista@1674
    22
krista@1674
    23
PEP_STATUS pgp_encrypt_only(
krista@1674
    24
        PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
krista@1674
    25
        size_t psize, char **ctext, size_t *csize
krista@1674
    26
    );
krista@1674
    27
krista@1674
    28
Edouard@174
    29
PEP_STATUS pgp_verify_text(
Edouard@174
    30
        PEP_SESSION session, const char *text, size_t size,
Edouard@174
    31
        const char *signature, size_t sig_size, stringlist_t **keylist
Edouard@174
    32
    );
Edouard@174
    33
Edouard@174
    34
PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
Edouard@174
    35
Edouard@179
    36
PEP_STATUS pgp_export_keydata(
Edouard@174
    37
        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
Edouard@174
    38
    );
Edouard@174
    39
Edouard@174
    40
PEP_STATUS pgp_find_keys(
Edouard@174
    41
        PEP_SESSION session, const char *pattern, stringlist_t **keylist
Edouard@174
    42
    );
Edouard@174
    43
krista@1030
    44
PEP_STATUS pgp_list_keyinfo(
krista@1033
    45
    PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list
krista@1022
    46
    );
krista@1022
    47
Edouard@174
    48
PEP_STATUS pgp_generate_keypair(
Edouard@174
    49
        PEP_SESSION session, pEp_identity *identity
Edouard@174
    50
    );
Edouard@174
    51
Edouard@174
    52
PEP_STATUS pgp_get_key_rating(
Edouard@174
    53
        PEP_SESSION session,
Edouard@174
    54
        const char *fpr,
Edouard@174
    55
        PEP_comm_type *comm_type
Edouard@174
    56
    );
Edouard@174
    57
Edouard@179
    58
PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
Edouard@174
    59
        size_t size);
Edouard@174
    60
Edouard@174
    61
PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
Edouard@174
    62
PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
Edouard@174
    63
Edouard@210
    64
PEP_STATUS pgp_renew_key(
Edouard@210
    65
        PEP_SESSION session,
Edouard@210
    66
        const char *fpr,
Edouard@210
    67
        const timestamp *ts
Edouard@210
    68
    );
Edouard@210
    69
Edouard@226
    70
PEP_STATUS pgp_revoke_key(
Edouard@226
    71
        PEP_SESSION session,
Edouard@226
    72
        const char *fpr,
Edouard@226
    73
        const char *reason
Edouard@226
    74
    );
Edouard@226
    75
Edouard@226
    76
PEP_STATUS pgp_key_expired(
Edouard@226
    77
        PEP_SESSION session,
Edouard@226
    78
        const char *fpr,
dirk@709
    79
        const time_t when,
Edouard@226
    80
        bool *expired
Edouard@226
    81
    );
Edouard@226
    82
Edouard@539
    83
PEP_STATUS pgp_key_revoked(
Edouard@539
    84
        PEP_SESSION session,
Edouard@539
    85
        const char *fpr,
Edouard@539
    86
        bool *revoked
Edouard@539
    87
    );
edouard@967
    88
edouard@967
    89
PEP_STATUS pgp_key_created(
edouard@967
    90
        PEP_SESSION session,
edouard@967
    91
        const char *fprstr,
edouard@967
    92
        time_t *created
edouard@967
    93
    );
edouard@967
    94
krista@1362
    95
PEP_STATUS pgp_contains_priv_key(
krista@1435
    96
    PEP_SESSION session,
krista@1362
    97
    const char *fpr,
krista@1362
    98
    bool *has_private);
krista@1362
    99
krista@1362
   100
PEP_STATUS pgp_find_private_keys(
krista@1362
   101
    PEP_SESSION session, const char *pattern, stringlist_t **keylist
krista@1362
   102
);