src/pgp_gpg.h
author Volker Birk <vb@pep.foundation>
Mon, 01 Aug 2016 12:03:00 +0200
branchkeysync
changeset 958 cef602982909
parent 728 80b966277620
child 1057 abff13590a4c
permissions -rw-r--r--
key_created() added to determine creation date of a key
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,
Edouard@728
    44
                              size_t size, identity_list **private_idents);
Edouard@728
    45
Edouard@728
    46
PEP_STATUS pgp_import_private_keydata(PEP_SESSION session, const char *key_data,
Edouard@728
    47
                                      size_t size, identity_list **private_idents);
vb@24
    48
vb@24
    49
PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
vb@200
    50
PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
vb@201
    51
vb@201
    52
PEP_STATUS pgp_renew_key(
vb@201
    53
        PEP_SESSION session,
vb@201
    54
        const char *fpr,
vb@201
    55
        const timestamp *ts
vb@201
    56
    );
vb@201
    57
vb@211
    58
PEP_STATUS pgp_revoke_key(
vb@211
    59
        PEP_SESSION session,
vb@211
    60
        const char *fpr,
vb@211
    61
        const char *reason
vb@211
    62
    );
vb@24
    63
vb@214
    64
PEP_STATUS pgp_key_expired(
vb@214
    65
        PEP_SESSION session,
vb@214
    66
        const char *fpr,
Edouard@701
    67
        const time_t when,
vb@214
    68
        bool *expired
vb@214
    69
    );
vb@214
    70
Edouard@662
    71
PEP_STATUS pgp_key_revoked(
Edouard@662
    72
        PEP_SESSION session,
Edouard@662
    73
        const char *fpr,
Edouard@662
    74
        bool *revoked
Edouard@662
    75
    );
Edouard@662
    76
vb@958
    77
PEP_STATUS pgp_key_created(
vb@958
    78
        PEP_SESSION session,
vb@958
    79
        const char *fpr,
vb@958
    80
        time_t *created
vb@958
    81
    );
vb@958
    82
vb@507
    83
PEP_STATUS pgp_binary(const char **path);
vb@507
    84
#define PGP_BINARY_PATH pgp_binary
vb@507
    85