author | Krista Bennett <krista@pep-project.org> |
Fri, 19 Jan 2018 11:01:39 +0100 | |
changeset 2415 | 7410f7666976 |
parent 2061 | 578476d90c0f |
child 4792 | 7056435ab9e7 |
child 5246 | 67016f508d40 |
permissions | -rw-r--r-- |
vb@1517 | 1 |
// This file is under GNU General Public License 3.0 |
vb@1517 | 2 |
// see LICENSE.txt |
vb@1517 | 3 |
|
fdik@494 | 4 |
#pragma once |
fdik@494 | 5 |
|
fdik@494 | 6 |
#include "pEpEngine.h" |
fdik@494 | 7 |
|
fdik@494 | 8 |
#ifdef __cplusplus |
fdik@494 | 9 |
extern "C" { |
fdik@494 | 10 |
#endif |
fdik@494 | 11 |
|
fdik@494 | 12 |
// blacklist_add() - add to blacklist |
fdik@494 | 13 |
// |
fdik@494 | 14 |
// parameters: |
fdik@494 | 15 |
// session (in) session to use |
fdik@494 | 16 |
// fpr (in) fingerprint of key to blacklist |
krista@2415 | 17 |
// |
krista@2415 | 18 |
// caveat: |
krista@2415 | 19 |
// there is no point in blacklisting an own key; for any own |
krista@2415 | 20 |
// identity, this will be ignored. The correct function to use |
krista@2415 | 21 |
// for own keys in this event is "key_reset_trust". |
krista@2415 | 22 |
// Also, this is only effective for OpenPGP-level trust. If |
krista@2415 | 23 |
// this key is for a pEp user, the blacklist is ignored. |
fdik@494 | 24 |
|
fdik@494 | 25 |
DYNAMIC_API PEP_STATUS blacklist_add(PEP_SESSION session, const char *fpr); |
fdik@494 | 26 |
|
fdik@494 | 27 |
|
fdik@494 | 28 |
// blacklist_delete() - delete from blacklist |
fdik@494 | 29 |
// |
fdik@494 | 30 |
// parameters: |
fdik@494 | 31 |
// session (in) session to use |
roker@2061 | 32 |
// fpr (in) fingerprint of key to be removed from blacklist |
fdik@494 | 33 |
|
fdik@494 | 34 |
DYNAMIC_API PEP_STATUS blacklist_delete(PEP_SESSION session, const char *fpr); |
fdik@494 | 35 |
|
fdik@494 | 36 |
|
roker@2061 | 37 |
// blacklist_is_listed() - is_listed in blacklist |
fdik@494 | 38 |
// |
fdik@494 | 39 |
// parameters: |
fdik@494 | 40 |
// session (in) session to use |
fdik@494 | 41 |
// fpr (in) fingerprint of key to blacklist |
vb@506 | 42 |
// bool (out) flags if key is blacklisted |
fdik@494 | 43 |
|
fdik@494 | 44 |
DYNAMIC_API PEP_STATUS blacklist_is_listed( |
fdik@494 | 45 |
PEP_SESSION session, |
fdik@494 | 46 |
const char *fpr, |
fdik@494 | 47 |
bool *listed |
fdik@494 | 48 |
); |
fdik@494 | 49 |
|
fdik@494 | 50 |
|
fdik@494 | 51 |
// blacklist_retrieve() - retrieve full blacklist of key fingerprints |
fdik@494 | 52 |
// |
fdik@494 | 53 |
// parameters: |
fdik@494 | 54 |
// session (in) session to use |
fdik@494 | 55 |
// blacklist (out) copy of blacklist |
fdik@494 | 56 |
// |
fdik@494 | 57 |
// caveat: |
fdik@494 | 58 |
// the ownership of the copy of blacklist goes to the caller |
fdik@494 | 59 |
|
fdik@494 | 60 |
DYNAMIC_API PEP_STATUS blacklist_retrieve( |
fdik@494 | 61 |
PEP_SESSION session, |
fdik@494 | 62 |
stringlist_t **blacklist |
fdik@494 | 63 |
); |
fdik@494 | 64 |
|
fdik@494 | 65 |
|
fdik@494 | 66 |
#ifdef __cplusplus |
fdik@494 | 67 |
} |
fdik@494 | 68 |
#endif |
fdik@494 | 69 |