src/openpgp_compat.h
author Neal H. Walfield <neal@pep.foundation>
Wed, 08 May 2019 12:20:37 +0200
branchemail_comparison
changeset 3649 1dd837adc30b
parent 3191 53dcb2892c3f
permissions -rw-r--r--
Fix public key.
vb@1513
     1
// This file is under GNU General Public License 3.0
vb@1513
     2
// see LICENSE.txt
vb@1513
     3
krista@1030
     4
// openpgp_compat.h
krista@1030
     5
//
krista@1030
     6
// These functions are the exposure of non-generic PGP-specific functionality (largely related to PGP
krista@1030
     7
// keyrings) to adapters that need them without polluting the engine interface.
krista@1030
     8
//
krista@1030
     9
#pragma once
krista@1030
    10
krista@1030
    11
#ifdef __cplusplus
krista@1030
    12
extern "C" {
krista@1030
    13
#endif
krista@1030
    14
krista@1030
    15
#include <stddef.h>
krista@1030
    16
#include <stdint.h>
krista@1030
    17
#include <stdbool.h>
krista@1030
    18
    
krista@1030
    19
#include "dynamic_api.h"
krista@1030
    20
#include "stringpair.h"    
krista@1030
    21
krista@1030
    22
#ifdef USE_GPG
krista@1030
    23
#include "pgp_gpg.h"
krista@1030
    24
#else
krista@1030
    25
#ifdef USE_NETPGP
krista@1030
    26
#include "pgp_netpgp.h"
neal@3191
    27
#else
neal@3191
    28
#ifdef USE_SEQUOIA
neal@3191
    29
#include "pgp_sequoia.h"
neal@3191
    30
#endif
krista@1030
    31
#endif
krista@1030
    32
#endif    
krista@1030
    33
    
krista@1096
    34
//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL or ""
krista@1096
    35
//                           to return entire keyring), filtering out revoked keys in the results
krista@1030
    36
//
krista@1030
    37
//  parameters:
krista@1030
    38
//      session (in)          session handle
krista@1096
    39
//      search_pattern (in)   search pattern - either an fpr, or something within the UID, or NULL / "" for
krista@1096
    40
//                            all keys
krista@1096
    41
//      keyinfo_list (out)    a key/value pair list for each key / UID combination
krista@1030
    42
//
krista@1055
    43
//  caveat:
krista@1055
    44
//      keyinfo_list must be freed by the caller.
krista@1030
    45
DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
krista@1032
    46
        PEP_SESSION session, const char* search_pattern, stringpair_list_t** keyinfo_list
krista@1030
    47
    );
krista@1030
    48
    
krista@1030
    49
#ifdef __cplusplus
krista@1030
    50
}
vb@1061
    51
#endif