Merging in default ENGINE-427
authorKrista Bennett <krista@pep-project.org>
Mon, 25 Jun 2018 09:27:36 +0200
branchENGINE-427
changeset 27615c59b5869d54
parent 2745 6a9496277bd6
parent 2759 3e2762e73975
child 2762 8792b6de7ee4
Merging in default
     1.1 --- a/Makefile.conf	Mon Jun 11 17:01:53 2018 +0200
     1.2 +++ b/Makefile.conf	Mon Jun 25 09:27:36 2018 +0200
     1.3 @@ -115,3 +115,6 @@
     1.4  # Example:
     1.5  #    EXTRA_MACROS=-DDEFAULT_KEYSERVER=\"default-server.org\" -DCRASHDUMP_DEFAULT_LINES=23
     1.6  #EXTRA_MACROS=
     1.7 +
     1.8 +# add this for running tests in debugger
     1.9 +#TEST_DEBUGGER=lldb --batch -o r
     2.1 --- a/default.conf	Mon Jun 11 17:01:53 2018 +0200
     2.2 +++ b/default.conf	Mon Jun 25 09:27:36 2018 +0200
     2.3 @@ -212,7 +212,7 @@
     2.4  ifeq ($(BUILD_FOR),Linux)
     2.5      LIBGPGME=libgpgme.so.11
     2.6  else ifeq ($(BUILD_FOR),Darwin)
     2.7 -    LIBGPGME=libgpgme.dylib
     2.8 +    LIBGPGME=libgpgme.11.dylib
     2.9  endif
    2.10  
    2.11  # libGPGME library search flag
     3.1 --- a/src/message_api.c	Mon Jun 11 17:01:53 2018 +0200
     3.2 +++ b/src/message_api.c	Mon Jun 25 09:27:36 2018 +0200
     3.3 @@ -1365,7 +1365,10 @@
     3.4              size_t blob_size = bl->size;
     3.5              bool free_blobval = false;
     3.6              
     3.7 -            if (is_encrypted_attachment(bl)) {
     3.8 +            if (is_encrypted_attachment(bl) &&
     3.9 +                    strstr(blob_value, "BEGIN PGP PUBLIC KEY") == NULL &&
    3.10 +                    strstr(blob_value, "BEGIN PGP PRIVATE KEY") == NULL) {
    3.11 +                    
    3.12                  char* bl_ptext = NULL;
    3.13                  size_t bl_psize = 0;
    3.14                  stringlist_t* bl_keylist = NULL;
     4.1 --- a/src/message_api.h	Mon Jun 11 17:01:53 2018 +0200
     4.2 +++ b/src/message_api.h	Mon Jun 25 09:27:36 2018 +0200
     4.3 @@ -271,7 +271,10 @@
     4.4  //      dst (out)           pointer to new decrypted message or NULL on failure
     4.5  //      keylist (inout)     in: stringlist with additional keyids for reencryption if needed
     4.6  //                              (will be freed and replaced with output keylist) 
     4.7 -//                          out: stringlist with keyids
     4.8 +//                          out: stringlist with keyids used for signing and encryption. first
     4.9 +//                               first key is signer, additional keys are the ones it was encrypted
    4.10 +//                               to. Only signer and whichever of the user's keys was used are 
    4.11 +//                               reliable
    4.12  //      rating (out)        rating for the message
    4.13  //      flags (inout)       flags to signal special decryption features
    4.14  //
     5.1 --- a/src/platform_unix.c	Mon Jun 11 17:01:53 2018 +0200
     5.2 +++ b/src/platform_unix.c	Mon Jun 25 09:27:36 2018 +0200
     5.3 @@ -448,4 +448,5 @@
     5.4          return agent_conf;
     5.5      return NULL;
     5.6  }
     5.7 -#endif
     5.8 \ No newline at end of file
     5.9 +#endif
    5.10 +
     6.1 --- a/src/platform_unix.h	Mon Jun 11 17:01:53 2018 +0200
     6.2 +++ b/src/platform_unix.h	Mon Jun 25 09:27:36 2018 +0200
     6.3 @@ -46,7 +46,11 @@
     6.4  
     6.5  const char *android_system_db(void);
     6.6  #define SYSTEM_DB android_system_db()
     6.7 +#ifdef __APPLE__
     6.8 +#define LIBGPGME "libgpgme.11.dylib"
     6.9 +#else
    6.10  #define LIBGPGME "libgpgme.so"
    6.11 +#endif
    6.12  
    6.13  #elif __APPLE__
    6.14  #include "TargetConditionals.h"
     7.1 --- a/test/Makefile	Mon Jun 11 17:01:53 2018 +0200
     7.2 +++ b/test/Makefile	Mon Jun 25 09:27:36 2018 +0200
     7.3 @@ -17,8 +17,8 @@
     7.4  OBJS := $(addsuffix .o,$(basename $(SRCS)))
     7.5  DEPS := $(OBJS:.o=.d)
     7.6  
     7.7 -INC_DIRS := ./include /usr/local/include  
     7.8 -INC_FLAGS := $(addprefix -I,$(INC_DIRS))
     7.9 +INC_DIRS := ./include /usr/local/include 
    7.10 +INC_FLAGS := $(addprefix -I,$(INC_DIRS)) $(GPGME_INC)
    7.11  
    7.12  LDFLAGS += -L/usr/local/lib
    7.13  
    7.14 @@ -100,7 +100,7 @@
    7.15  test_home_: 
    7.16  	
    7.17  
    7.18 -.PHONY: test_home_
    7.19 +.PHONY: scripts
    7.20  scripts: 
    7.21  ifdef PY_ENV
    7.22  	$(PY_ENV) genscripts.py
    7.23 @@ -108,7 +108,7 @@
    7.24  
    7.25  .PHONY: test
    7.26  test: all
    7.27 -	./$(TARGET)
    7.28 +	$(TEST_DEBUGGER) ./$(TARGET)
    7.29  	
    7.30  .PHONY: clean
    7.31  clean: