src/openpgp_compat.h
author Krista Bennett <krista@pep-project.org>
Wed, 15 Mar 2017 18:02:46 +0100
changeset 1674 5639f969866a
parent 1513 e7f7e42385b5
child 2416 448d74f8eb90
permissions -rw-r--r--
Added pgp_encrypt_only stubs for NetPGP
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"
krista@1030
    27
#endif
krista@1030
    28
#endif    
krista@1030
    29
    
krista@1096
    30
//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL or ""
krista@1096
    31
//                           to return entire keyring), filtering out revoked keys in the results
krista@1030
    32
//
krista@1030
    33
//  parameters:
krista@1030
    34
//      session (in)          session handle
krista@1096
    35
//      search_pattern (in)   search pattern - either an fpr, or something within the UID, or NULL / "" for
krista@1096
    36
//                            all keys
krista@1096
    37
//      keyinfo_list (out)    a key/value pair list for each key / UID combination
krista@1030
    38
//
krista@1055
    39
//  caveat:
krista@1055
    40
//      keyinfo_list must be freed by the caller.
krista@1030
    41
DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
krista@1032
    42
        PEP_SESSION session, const char* search_pattern, stringpair_list_t** keyinfo_list
krista@1030
    43
    );
krista@1030
    44
    
krista@1030
    45
#ifdef __cplusplus
krista@1030
    46
}
vb@1061
    47
#endif
vb@1061
    48