merged with default ENGINE-1
authorKrista Grothoff <krista@pep-project.org>
Thu, 08 Sep 2016 12:19:50 +0200
branchENGINE-1
changeset 11507939fb82abf4
parent 1094 b9e61b494b61
parent 1142 b0b208f85c88
merged with default
     1.1 --- a/pEpEngine.vcxproj	Tue Aug 30 10:43:14 2016 +0200
     1.2 +++ b/pEpEngine.vcxproj	Thu Sep 08 12:19:50 2016 +0200
     1.3 @@ -14,7 +14,7 @@
     1.4      <ProjectGuid>{146E69F8-E1DA-456A-B048-6DD29D9ACF6B}</ProjectGuid>
     1.5      <Keyword>Win32Proj</Keyword>
     1.6      <RootNamespace>pEpEngine</RootNamespace>
     1.7 -	<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
     1.8 +    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
     1.9    </PropertyGroup>
    1.10    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
    1.11    <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
    1.12 @@ -60,7 +60,7 @@
    1.13        <SDLCheck>true</SDLCheck>
    1.14        <EnablePREfast>false</EnablePREfast>
    1.15        <AdditionalIncludeDirectories>C:\Users\vb\share\asn1c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    1.16 -	  <CompileAs>Default</CompileAs>
    1.17 +      <CompileAs>Default</CompileAs>
    1.18      </ClCompile>
    1.19      <Link>
    1.20        <SubSystem>Windows</SubSystem>
    1.21 @@ -83,7 +83,7 @@
    1.22        <SDLCheck>false</SDLCheck>
    1.23        <TreatWarningAsError>false</TreatWarningAsError>
    1.24        <AdditionalIncludeDirectories>C:\Users\vb\share\asn1c;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    1.25 -	  <CompileAs>Default</CompileAs>
    1.26 +      <CompileAs>Default</CompileAs>
    1.27      </ClCompile>
    1.28      <Link>
    1.29        <SubSystem>Windows</SubSystem>
    1.30 @@ -110,6 +110,7 @@
    1.31      <ClCompile Include="src\message.c" />
    1.32      <ClCompile Include="src\message_api.c" />
    1.33      <ClCompile Include="src\mime.c" />
    1.34 +    <ClCompile Include="src\openpgp_compat.c" />
    1.35      <ClCompile Include="src\pEpEngine.c" />
    1.36      <ClCompile Include="src\pgp_gpg.c" />
    1.37      <ClCompile Include="src\platform_windows.cpp" />
    1.38 @@ -139,6 +140,7 @@
    1.39      <ClInclude Include="src\message.h" />
    1.40      <ClInclude Include="src\message_api.h" />
    1.41      <ClInclude Include="src\mime.h" />
    1.42 +    <ClInclude Include="src\openpgp_compat.h" />
    1.43      <ClInclude Include="src\pEpEngine.h" />
    1.44      <ClInclude Include="src\pEp_internal.h" />
    1.45      <ClInclude Include="src\pgp_gpg.h" />
     2.1 --- a/pEpEngine.vcxproj.filters	Tue Aug 30 10:43:14 2016 +0200
     2.2 +++ b/pEpEngine.vcxproj.filters	Thu Sep 08 12:19:50 2016 +0200
     2.3 @@ -93,6 +93,9 @@
     2.4      <ClCompile Include="src\sync_send_actions.c">
     2.5        <Filter>Quelldateien</Filter>
     2.6      </ClCompile>
     2.7 +    <ClCompile Include="src\openpgp_compat.c">
     2.8 +      <Filter>Quelldateien</Filter>
     2.9 +    </ClCompile>
    2.10    </ItemGroup>
    2.11    <ItemGroup>
    2.12      <ClInclude Include="src\keymanagement.h">
    2.13 @@ -182,6 +185,9 @@
    2.14      <ClInclude Include="src\baseprotocol.h">
    2.15        <Filter>Headerdateien</Filter>
    2.16      </ClInclude>
    2.17 +    <ClInclude Include="src\openpgp_compat.h">
    2.18 +      <Filter>Headerdateien</Filter>
    2.19 +    </ClInclude>
    2.20    </ItemGroup>
    2.21    <ItemGroup>
    2.22      <Text Include="LICENSE.txt" />
     3.1 --- a/src/openpgp_compat.h	Tue Aug 30 10:43:14 2016 +0200
     3.2 +++ b/src/openpgp_compat.h	Thu Sep 08 12:19:50 2016 +0200
     3.3 @@ -24,14 +24,14 @@
     3.4  #endif
     3.5  #endif    
     3.6      
     3.7 -//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL
     3.8 -//                           to return entire keyring)
     3.9 +//  OpenPGP_list_keyinfo() - get a key/UID list for pattern matches in keyring (NULL or ""
    3.10 +//                           to return entire keyring), filtering out revoked keys in the results
    3.11  //
    3.12  //  parameters:
    3.13  //      session (in)          session handle
    3.14 -//      show_revoked (in)     true if identities with revoked primary keys should also
    3.15 -//                            be listed; false if only valid keys should be shown
    3.16 -//      keyinfo_list (out)    list of identities for each available key 
    3.17 +//      search_pattern (in)   search pattern - either an fpr, or something within the UID, or NULL / "" for
    3.18 +//                            all keys
    3.19 +//      keyinfo_list (out)    a key/value pair list for each key / UID combination
    3.20  //
    3.21  //  caveat:
    3.22  //      keyinfo_list must be freed by the caller.
     4.1 --- a/src/platform_unix.c	Tue Aug 30 10:43:14 2016 +0200
     4.2 +++ b/src/platform_unix.c	Thu Sep 08 12:19:50 2016 +0200
     4.3 @@ -124,11 +124,13 @@
     4.4      return retval;
     4.5  }
     4.6  
     4.7 +#ifdef USE_NETPGP
     4.8  // FIXME: This may cause problems - this is a quick compatibility fix for netpgp code
     4.9  int regnexec(const regex_t* preg, const char* string,
    4.10               size_t len, size_t nmatch, regmatch_t pmatch[], int eflags) {
    4.11      return regexec(preg, string, nmatch, pmatch, eflags);
    4.12  }
    4.13 +#endif
    4.14  
    4.15  #endif
    4.16  
     5.1 --- a/src/platform_unix.h	Tue Aug 30 10:43:14 2016 +0200
     5.2 +++ b/src/platform_unix.h	Thu Sep 08 12:19:50 2016 +0200
     5.3 @@ -44,10 +44,17 @@
     5.4  #if !defined(BSD) && !defined(__APPLE__)
     5.5  size_t strlcpy(char* dst, const	char* src, size_t size);
     5.6  size_t strlcat(char* dst, const	char* src, size_t size);
     5.7 +
     5.8 +// N.B. This is ifdef'd out because NDK users sometimes have trouble finding regex functions in
     5.9 +//      the library in spite of the inclusion of regex.h - this is a FIXME, but since iOS is
    5.10 +//      *currently* the only netpgp user, we will ifdef this so that we don't block Android.
    5.11 +#ifdef USE_NETPGP
    5.12  int regnexec(const regex_t* preg, const char* string,
    5.13               size_t len, size_t nmatch, regmatch_t pmatch[], int eflags);
    5.14  #endif
    5.15  
    5.16 +#endif
    5.17 +
    5.18  #ifdef __cplusplus
    5.19  }
    5.20  #endif
     6.1 --- a/test/pEpEngineTest.cc	Tue Aug 30 10:43:14 2016 +0200
     6.2 +++ b/test/pEpEngineTest.cc	Thu Sep 08 12:19:50 2016 +0200
     6.3 @@ -76,21 +76,24 @@
     6.4      release(second_session);
     6.5  
     6.6      cout << "logging test\n";
     6.7 -    log_event(session, "log test", "pEp Enginge Test", "This is a logging test sample.", "please ignore this line");
     6.8 +    log_event(session, "log test", "pEp Engine Test", "This is a logging test sample.", "please ignore this line");
     6.9  
    6.10      // Our test user :
    6.11      // pEp Test Alice (test key don't use) <pep.test.alice@pep-project.org>
    6.12 -    //         6FF00E97
    6.13 -    // A9411D176FF00E97
    6.14 +    //                                 6FF00E97 -- won't work as search term with NetPGP
    6.15 +    //                         A9411D176FF00E97 -- won't work as search term with NetPGP
    6.16 +    // 4ABE3AAF59AC32CFE4F86500A9411D176FF00E97 -- full key fingerprint
    6.17      // 
    6.18      // Other peers :
    6.19      // pEp Test Bob (test key, don't use) <pep.test.bob@pep-project.org> 
    6.20 -    //         C9C2EE39
    6.21 -    // 59BFF488C9C2EE39
    6.22 +    //                                 C9C2EE39 -- won't work as search term with NetPGP
    6.23 +    //                         59BFF488C9C2EE39 -- won't work as search term with NetPGP
    6.24 +    // BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39 -- full key fingerprint
    6.25      // 
    6.26      // pEp Test John (test key, don't use) <pep.test.john@pep-project.org>
    6.27 -    //         70DCF575
    6.28 -    // 135CD6D170DCF575
    6.29 +    //                                 70DCF575 -- won't work as search term with NetPGP
    6.30 +    //                         135CD6D170DCF575 -- won't work as search term with NetPGP
    6.31 +    // AA2E4BEB93E5FE33DEFD8BE1135CD6D170DCF575 -- full key fingerprint
    6.32  
    6.33      const char *kflist[] = {
    6.34          "0x6FF00E97.asc",
    6.35 @@ -153,9 +156,9 @@
    6.36      assert(verify_result == PEP_DECRYPT_SIGNATURE_DOES_NOT_MATCH);
    6.37      free_stringlist(keylist);
    6.38  
    6.39 -    keylist = new_stringlist("A9411D176FF00E97");
    6.40 -    stringlist_add(keylist, "59BFF488C9C2EE39");
    6.41 -    stringlist_add(keylist, "135CD6D170DCF575");
    6.42 +    keylist = new_stringlist("4ABE3AAF59AC32CFE4F86500A9411D176FF00E97");
    6.43 +    stringlist_add(keylist, "BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39");
    6.44 +    stringlist_add(keylist, "AA2E4BEB93E5FE33DEFD8BE1135CD6D170DCF575");
    6.45  
    6.46      buf_text = NULL;
    6.47      buf_size = 0;
    6.48 @@ -279,7 +282,7 @@
    6.49      assert(send_key_status == PEP_STATUS_OK);
    6.50  
    6.51      PEP_comm_type tcomm_type;
    6.52 -    PEP_STATUS tstatus = get_key_rating(session, "59BFF488C9C2EE39", &tcomm_type);
    6.53 +    PEP_STATUS tstatus = get_key_rating(session, "BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39", &tcomm_type);
    6.54      cout << "get_key_rating() exits with " << tstatus << "\n";
    6.55      assert(tstatus == PEP_STATUS_OK);
    6.56      assert(tcomm_type == PEP_ct_OpenPGP_unconfirmed);