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