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