Merged default to keysync keysync
authorEdouard Tisserant
Thu, 01 Sep 2016 14:16:18 +0200
branchkeysync
changeset 1118df6c0c9aa76a
parent 1106 abba29079e14
parent 1096 396214c5cd9b
child 1119 97f329284202
Merged default to keysync
src/openpgp_compat.h
src/platform_unix.c
src/platform_unix.h
     1.1 --- a/src/openpgp_compat.h	Wed Aug 31 13:29:10 2016 +0100
     1.2 +++ b/src/openpgp_compat.h	Thu Sep 01 14:16:18 2016 +0200
     1.3 @@ -24,14 +24,14 @@
     1.4  #endif
     1.5  #endif    
     1.6      
     1.7 -//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL
     1.8 -//                           to return entire keyring)
     1.9 +//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL or ""
    1.10 +//                           to return entire keyring), filtering out revoked keys in the results
    1.11  //
    1.12  //  parameters:
    1.13  //      session (in)          session handle
    1.14 -//      show_revoked (in)     true if identities with revoked primary keys should also
    1.15 -//                            be listed; false if only valid keys should be shown
    1.16 -//      keyinfo_list (out)    list of identities for each available key 
    1.17 +//      search_pattern (in)   search pattern - either an fpr, or something within the UID, or NULL / "" for
    1.18 +//                            all keys
    1.19 +//      keyinfo_list (out)    a key/value pair list for each key / UID combination
    1.20  //
    1.21  //  caveat:
    1.22  //      keyinfo_list must be freed by the caller.
     2.1 --- a/src/platform_unix.c	Wed Aug 31 13:29:10 2016 +0100
     2.2 +++ b/src/platform_unix.c	Thu Sep 01 14:16:18 2016 +0200
     2.3 @@ -126,11 +126,13 @@
     2.4      return retval;
     2.5  }
     2.6  
     2.7 +#ifdef USE_NETPGP
     2.8  // FIXME: This may cause problems - this is a quick compatibility fix for netpgp code
     2.9  int regnexec(const regex_t* preg, const char* string,
    2.10               size_t len, size_t nmatch, regmatch_t pmatch[], int eflags) {
    2.11      return regexec(preg, string, nmatch, pmatch, eflags);
    2.12  }
    2.13 +#endif
    2.14  
    2.15  #endif
    2.16  
     3.1 --- a/src/platform_unix.h	Wed Aug 31 13:29:10 2016 +0100
     3.2 +++ b/src/platform_unix.h	Thu Sep 01 14:16:18 2016 +0200
     3.3 @@ -51,10 +51,17 @@
     3.4  #if !defined(BSD) && !defined(__APPLE__)
     3.5  size_t strlcpy(char* dst, const	char* src, size_t size);
     3.6  size_t strlcat(char* dst, const	char* src, size_t size);
     3.7 +
     3.8 +// N.B. This is ifdef'd out because NDK users sometimes have trouble finding regex functions in
     3.9 +//      the library in spite of the inclusion of regex.h - this is a FIXME, but since iOS is
    3.10 +//      *currently* the only netpgp user, we will ifdef this so that we don't block Android.
    3.11 +#ifdef USE_NETPGP
    3.12  int regnexec(const regex_t* preg, const char* string,
    3.13               size_t len, size_t nmatch, regmatch_t pmatch[], int eflags);
    3.14  #endif
    3.15  
    3.16 +#endif
    3.17 +
    3.18  #ifndef _UUID_STRING_T
    3.19  #define _UUID_STRING_T
    3.20  typedef char uuid_string_t[37];