src/openpgp_compat.c
author Krista Grothoff <krista@pep-project.org>
Thu, 18 Aug 2016 13:23:15 +0200
branchENGINE-73
changeset 1030 4354451338cd
child 1032 b4004d33c2a2
permissions -rw-r--r--
ENGINE-73 added openpgp compat files for listing keyinfo #comment Redesign: function is now OpenPGP_list_keyinfo() in openpgp_compat.c/.h, returns full pgp key fingerprint + primary gpg uid string (Real Name <email@address.blah>)
krista@1030
     1
#include "pEp_internal.h"
krista@1030
     2
#include "dynamic_api.h"
krista@1030
     3
#include "openpgp_compat.h"
krista@1030
     4
krista@1030
     5
DYNAMIC_API PEP_STATUS OpenPGP_list_keyinfo (
krista@1030
     6
        PEP_SESSION session, stringpair_list_t** keyinfo_list, char* search_pattern
krista@1030
     7
    );
krista@1030
     8
{
krista@1030
     9
    assert(session);
krista@1030
    10
    assert(keyinfo_list);
krista@1030
    11
krista@1030
    12
    if (!(session && keyinfo_list))
krista@1030
    13
        return PEP_ILLEGAL_VALUE;
krista@1030
    14
krista@1030
    15
    stringpair_list_t* _keyinfo_list = NULL;
krista@1030
    16
    
krista@1030
    17
    PEP_STATUS retval = pgp_list_keyinfo(session, _keyinfo_list, search_pattern);
krista@1030
    18
        
krista@1030
    19
    if (retval == PEP_STATUS_OK)
krista@1030
    20
        *keyinfo_list = _keyinfo_list;
krista@1030
    21
    
krista@1030
    22
    return retval;
krista@1030
    23
}