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.
Edouard@174
     1
#pragma once
Edouard@174
     2
Edouard@174
     3
#include "pEpEngine.h"
Edouard@174
     4
Edouard@174
     5
PEP_STATUS pgp_init(PEP_SESSION session, bool in_first);
Edouard@174
     6
void pgp_release(PEP_SESSION session, bool out_last);
Edouard@174
     7
Edouard@174
     8
PEP_STATUS pgp_decrypt_and_verify(
Edouard@174
     9
        PEP_SESSION session, const char *ctext, size_t csize,
Edouard@174
    10
        char **ptext, size_t *psize, stringlist_t **keylist
Edouard@174
    11
    );
Edouard@174
    12
Edouard@174
    13
PEP_STATUS pgp_encrypt_and_sign(
Edouard@174
    14
        PEP_SESSION session, const stringlist_t *keylist, const char *ptext,
Edouard@174
    15
        size_t psize, char **ctext, size_t *csize
Edouard@174
    16
    );
Edouard@174
    17
Edouard@174
    18
PEP_STATUS pgp_verify_text(
Edouard@174
    19
        PEP_SESSION session, const char *text, size_t size,
Edouard@174
    20
        const char *signature, size_t sig_size, stringlist_t **keylist
Edouard@174
    21
    );
Edouard@174
    22
Edouard@174
    23
PEP_STATUS pgp_delete_keypair(PEP_SESSION session, const char *fpr);
Edouard@174
    24
Edouard@179
    25
PEP_STATUS pgp_export_keydata(
Edouard@174
    26
        PEP_SESSION session, const char *fpr, char **key_data, size_t *size
Edouard@174
    27
    );
Edouard@174
    28
Edouard@174
    29
PEP_STATUS pgp_find_keys(
Edouard@174
    30
        PEP_SESSION session, const char *pattern, stringlist_t **keylist
Edouard@174
    31
    );
Edouard@174
    32
krista@1030
    33
PEP_STATUS pgp_list_keyinfo(
krista@1033
    34
    PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list
krista@1022
    35
    );
krista@1022
    36
Edouard@174
    37
PEP_STATUS pgp_generate_keypair(
Edouard@174
    38
        PEP_SESSION session, pEp_identity *identity
Edouard@174
    39
    );
Edouard@174
    40
Edouard@174
    41
PEP_STATUS pgp_get_key_rating(
Edouard@174
    42
        PEP_SESSION session,
Edouard@174
    43
        const char *fpr,
Edouard@174
    44
        PEP_comm_type *comm_type
Edouard@174
    45
    );
Edouard@174
    46
Edouard@179
    47
PEP_STATUS pgp_import_keydata(PEP_SESSION session, const char *key_data,
Edouard@174
    48
        size_t size);
Edouard@174
    49
Edouard@174
    50
PEP_STATUS pgp_recv_key(PEP_SESSION session, const char *pattern);
Edouard@174
    51
PEP_STATUS pgp_send_key(PEP_SESSION session, const char *pattern);
Edouard@174
    52
Edouard@210
    53
PEP_STATUS pgp_renew_key(
Edouard@210
    54
        PEP_SESSION session,
Edouard@210
    55
        const char *fpr,
Edouard@210
    56
        const timestamp *ts
Edouard@210
    57
    );
Edouard@210
    58
Edouard@226
    59
PEP_STATUS pgp_revoke_key(
Edouard@226
    60
        PEP_SESSION session,
Edouard@226
    61
        const char *fpr,
Edouard@226
    62
        const char *reason
Edouard@226
    63
    );
Edouard@226
    64
Edouard@226
    65
PEP_STATUS pgp_key_expired(
Edouard@226
    66
        PEP_SESSION session,
Edouard@226
    67
        const char *fpr,
dirk@709
    68
        const time_t when,
Edouard@226
    69
        bool *expired
Edouard@226
    70
    );
Edouard@226
    71
Edouard@539
    72
PEP_STATUS pgp_key_revoked(
Edouard@539
    73
        PEP_SESSION session,
Edouard@539
    74
        const char *fpr,
Edouard@539
    75
        bool *revoked
Edouard@539
    76
    );