src/openpgp_compat.h
author Krista Bennett <krista@pep-project.org>
Tue, 14 Aug 2018 13:45:34 +0200
branchENGINE-451
changeset 2826 07c080d73a63
parent 2458 2dfe65bd3613
child 3191 53dcb2892c3f
permissions -rw-r--r--
ENGINE-451: abandoning branch - config files to be dealt with using gpgme (and hotfix will be external to engine
     1 // This file is under GNU General Public License 3.0
     2 // see LICENSE.txt
     3 
     4 // openpgp_compat.h
     5 //
     6 // These functions are the exposure of non-generic PGP-specific functionality (largely related to PGP
     7 // keyrings) to adapters that need them without polluting the engine interface.
     8 //
     9 #pragma once
    10 
    11 #ifdef __cplusplus
    12 extern "C" {
    13 #endif
    14 
    15 #include <stddef.h>
    16 #include <stdint.h>
    17 #include <stdbool.h>
    18     
    19 #include "dynamic_api.h"
    20 #include "stringpair.h"    
    21 
    22 #ifdef USE_GPG
    23 #include "pgp_gpg.h"
    24 #else
    25 #ifdef USE_NETPGP
    26 #include "pgp_netpgp.h"
    27 #endif
    28 #endif    
    29     
    30 //  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL or ""
    31 //                           to return entire keyring), filtering out revoked keys in the results
    32 //
    33 //  parameters:
    34 //      session (in)          session handle
    35 //      search_pattern (in)   search pattern - either an fpr, or something within the UID, or NULL / "" for
    36 //                            all keys
    37 //      keyinfo_list (out)    a key/value pair list for each key / UID combination
    38 //
    39 //  caveat:
    40 //      keyinfo_list must be freed by the caller.
    41 DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
    42         PEP_SESSION session, const char* search_pattern, stringpair_list_t** keyinfo_list
    43     );
    44     
    45 #ifdef __cplusplus
    46 }
    47 #endif