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