Replace use of Sequoia's backend with a custom key store.
- Sequoia's key store doesn't meet pep's needs (in particular, the
ability to search on a key's user id) and trying to shoehorn pep's
needs onto Sequoia's key store abstractions is just introducing
overhead with no appreciable gain in functionality.
- This patch changes the Sequoia backend to use a local sqlite
database to store the public keys.
2 # Copyright 2017, pEp Foundation
3 # This file is part of pEpEngine
4 # This file may be used under the terms of the GNU General Public License version 3
7 include ../default.conf
9 PY_ENV := $(shell command -v python3 2> /dev/null)
12 TEST_HOME=$(HERE)/pEp_test_home
16 SRCS := $(wildcard src/*.cc) $(wildcard src/*/*.cc)
17 OBJS := $(addsuffix .o,$(basename $(SRCS)))
20 INC_DIRS := ./include /usr/local/include ../src ../sync ../asn.1
21 INC_FLAGS := $(addprefix -I,$(INC_DIRS)) $(GPGME_INC) $(CPPUNIT_INC)
23 LDFLAGS += -L/usr/local/lib
25 CFLAGS += -Wno-deprecated
26 CXXFLAGS += -Wno-deprecated
27 CFLAGS:=$(filter-out -Wall,$(CFLAGS))
29 LDFLAGS+= $(ETPAN_LIB) $(CPPUNIT_LIB) -L../asn.1 -L../src
30 LDLIBS+= -letpan -lpEpEngine -lstdc++ -lasn1
32 ifeq ($(BUILD_FOR),Linux)
36 ifeq ($(OPENPGP),NETPGP)
39 ifeq ($(BUILD_FOR),Linux)
44 ifeq ($(OPENPGP),SEQUOIA)
45 LDFLAGS+= $(SEQUOIA_LDFLAGS)
46 LDLIBS+= $(SEQUOIA_LIB)
47 CFLAGS+= $(SEQUOIA_CFLAGS)
48 INC_FLAGS+= $(SEQUOIA_INC)
55 ifeq ($(shell uname),Darwin)
56 LIBPATH=DYLD_LIBRARY_PATH
57 LLDB_BIN=/Applications/Xcode.app/Contents/Developer/usr/bin/lldb
59 LIBPATH=LD_LIBRARY_PATH
66 # Create a list of the extra library paths for the loader. I do not assume that the engine (and its dependencies) are installed for testing.
67 # Note that += can not be used here, as it changes the amount of whitespace
68 EXTRA_LIB_PATHS=../src:
70 EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(ETPAN_LIB)):
73 EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(GPGME_LIB)):
76 EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS)$(patsubst -L%,%,$(NETPGP_LIB)):
80 EXTRA_LIB_PATHS:=$(EXTRA_LIB_PATHS::=)
82 CFLAGS:=$(filter-out -DNDEBUG,$(CFLAGS))
83 ifneq ($(MAKECMDGOALS),clean)
84 ifneq (,$(findstring -DNDEBUG,$(CFLAGS)))
85 $(error The macro NDEBUG must not be defined for test compilation.)
89 CXXFLAGS:=$(filter-out -DNDEBUG,$(CXXFLAGS))
90 ifneq ($(MAKECMDGOALS),clean)
91 ifneq (,$(findstring -DNDEBUG,$(CXXFLAGS)))
92 $(error The macro NDEBUG must not be defined for test compilation.)
96 CPPFLAGS += $(INC_FLAGS) -MMD -MP
98 all: suitemaker $(TARGET) test_home_ scripts
101 $(CXX) -c $(CFLAGS) $(CPPFLAGS) $< -o $@
104 $(CXX) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) -o $@
109 @echo "WARNING: Can't find python3 - this is fine unless you're adding test suites. If so, please install python3."
112 $(PY_ENV) gensuitemaker.py
114 # Comma-separated list, no spaces
115 $(PY_ENV) gensuitemaker.py --exclude=$(EXCLUDE)
126 $(PY_ENV) genscripts.py
131 ulimit -n 20000; $(TEST_DEBUGGER) ./$(TARGET)
135 $(RM) $(TARGET) $(OBJS) $(DEPS)
136 $(RM) $(HERE)/*Tests msg_2.0.asc