src/openpgp_compat.h
author Krista Grothoff <krista@pep-project.org>
Sat, 24 Sep 2016 18:09:18 +0200
branchENGINE-27
changeset 1185 4b01328f3cf2
parent 1096 396214c5cd9b
child 1118 df6c0c9aa76a
permissions -rw-r--r--
ENGINE-27: update_identity no longer pays attention to the input identity's fpr, but pulls one from elect_pubkey.
krista@1030
     1
// openpgp_compat.h
krista@1030
     2
//
krista@1030
     3
// These functions are the exposure of non-generic PGP-specific functionality (largely related to PGP
krista@1030
     4
// keyrings) to adapters that need them without polluting the engine interface.
krista@1030
     5
//
krista@1030
     6
#pragma once
krista@1030
     7
krista@1030
     8
#ifdef __cplusplus
krista@1030
     9
extern "C" {
krista@1030
    10
#endif
krista@1030
    11
krista@1030
    12
#include <stddef.h>
krista@1030
    13
#include <stdint.h>
krista@1030
    14
#include <stdbool.h>
krista@1030
    15
    
krista@1030
    16
#include "dynamic_api.h"
krista@1030
    17
#include "stringpair.h"    
krista@1030
    18
krista@1030
    19
#ifdef USE_GPG
krista@1030
    20
#include "pgp_gpg.h"
krista@1030
    21
#else
krista@1030
    22
#ifdef USE_NETPGP
krista@1030
    23
#include "pgp_netpgp.h"
krista@1030
    24
#endif
krista@1030
    25
#endif    
krista@1030
    26
    
krista@1096
    27
//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL or ""
krista@1096
    28
//                           to return entire keyring), filtering out revoked keys in the results
krista@1030
    29
//
krista@1030
    30
//  parameters:
krista@1030
    31
//      session (in)          session handle
krista@1096
    32
//      search_pattern (in)   search pattern - either an fpr, or something within the UID, or NULL / "" for
krista@1096
    33
//                            all keys
krista@1096
    34
//      keyinfo_list (out)    a key/value pair list for each key / UID combination
krista@1030
    35
//
krista@1055
    36
//  caveat:
krista@1055
    37
//      keyinfo_list must be freed by the caller.
krista@1030
    38
DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
krista@1032
    39
        PEP_SESSION session, const char* search_pattern, stringpair_list_t** keyinfo_list
krista@1030
    40
    );
krista@1030
    41
    
krista@1030
    42
#ifdef __cplusplus
krista@1030
    43
}
krista@1030
    44
#endif