Compare commits

..

1 Commits

@ -1,6 +0,0 @@
# 1st Party Dependencies
## Prefer git tags instead of SHA hashes always
pEpEngine=v3.2.0-RC23
libpEpAdapter= v3.2.0-RC3
libpEpCxx=v3.2.0-RC0

@ -7,26 +7,18 @@ any client.
## Requirements
In order to use the p≡p JSON Server Adapter, you need to build and run it.
Currently, Linux (Debian 10, Ubuntu 18.04.6 LTS) and MacOS (10.11, 10.12) are
supported. The build for windows is in `build-windows`
Currently, Linux (Debian 9, Ubuntu 16.04) and MacOS (10.11, 10.12) are
supported, Windows is about to follow. Newer versions should also work
(file a bug report if not) but are not in our main focus, yet.
## Dependencies
* C++ compiler: tested with g++ 4.8, 4.9, 8.3, 11, 12 and clang++ 2.8. Newer
versions should work, too.
* C++ compiler: tested with g++ 4.8, 4.9, 8.3 and clang++ 2.8. Newer versions should work, too.
* GNU make
* libboost-thread-dev (tested with 1.58, 1.62, 1.67, 1.70 and 1.74)
* libboost-program-options-dev
* libboost-filesystem-dev
* [p≡p Engine](https://gitea.pep.foundation/pEp.foundation/pEpEngine/)
a p≡p Engine in the 3.x series, not released yet as of 2022-09; at the
time of writing this is the Engine master branch
(with its own dependencies, in particular:
* libpEpTransport
* libpepcxx11
* pEpEngineSequoiaBackend
* a patched libetpan
* libboost-system-dev
)
(which needs sequoia, a patched libetpan, libboost-system-dev)
* [libpEpAdapter](https://gitea.pep.foundation/pEp.foundation/libpEpAdapter/)
* [webserver](https://gitea.pep.foundation/fdik/webserver)
* OSSP libuuid
@ -73,10 +65,61 @@ cd ~/code/json-ad/server
| :warning: FIXME: The following instructions refer to the old Makefile system that built a dynamically linked binary. This old Makefile was replaced by a hack to create a static binary. Unfortunately the config flexibility of the old Makefile system was removed in this change. |
| ------ |
| There is now also an ad-hoc created `Makefile.Linux`, which also can only be configured directly by editing the file. :-( |
| ------ |
| TODO: Re-create a more flexible build system with a `Makefile` (which is under revision control) and a `local.conf` (which is not, but contains your local-only config settings) |
| ------ |
Edit the build configuration to your needs in `./Makefile.conf`, or create a
`./local.conf` that sets any of the make variables documented in
`./Makefile.conf`.
If a dependency is not found in your system's default include or library
paths, you will have to specify the according paths in a make variable.
Typically, this has to be done at least for the pEp Engine, libetpan and
libevent.
Below are two sample `./local.conf` files, for orientation.
macOS 10.12, 10.13:
~~~~~
PREFIX=$(HOME)/code/json-ad/build
HTML_DIRECTORY=$(PREFIX)/share/pEp/json-adapter/html
GTEST_DIR=$(HOME)/code/gtest/googletest
BOOST_INC=-I$(HOME)/Cellar/boost/1.65.1/include
BOOST_LIB=-L$(HOME)/Cellar/boost/1.65.1/lib
ENGINE_INC=-I$(HOME)/code/engine/build/include
ENGINE_LIB=-L$(HOME)/code/engine/build/lib
ETPAN_INC=-I$(HOME)/code/libetpan/build/include
ETPAN_LIB=-L$(HOME)/code/libetpan/build/lib
Make copy of the `local.conf.example` and call it `local.conf`
Adjust the values in `local.conf` to your needs. Most likely, at least the PREFIX option.
GPGME_INC=-I$(HOME)/Cellar/gpgme/1.9.0_1/include
GPGME_LIB=-L$(HOME)/Cellar/gpgme/1.9.0_1/lib
UUID_INC=-I$(HOME)/Cellar/ossp-uuid/1.6.2_2/include
UUID_LIB=-L$(HOME)/Cellar/ossp-uuid/1.6.2_2/lib
~~~~~
Debian 9/10:
~~~~~
PREFIX=$(HOME)/code/json-ad/build
HTML_DIRECTORY=$(PREFIX)/share/pEp/json-adapter/html
GTEST_DIR=/usr/src/googletest/googletest/
ENGINE_INC=-I$(HOME)/code/engine/build/include
ENGINE_LIB=-L$(HOME)/code/engine/build/lib
ETPAN_INC=-I$(HOME)/code/libetpan/build/include
ETPAN_LIB=-L$(HOME)/code/libetpan/build/lib
~~~~~
Now, build and install the server:
@ -85,10 +128,10 @@ make all
make install
~~~~~
TODO: verify this
If you only want to build the JsonAdapter library, run `make lib` and you'll get
a libjson-adapter.a
With `make test` you can execute the server's tests.

@ -20,12 +20,7 @@
pre.red {white-space:pre; background-color:#d99; }
</style>
<script type="text/javascript" src="jquery.js"></script>
<!-- positron 2022-09-07: I hardwired this path, which is "wrong" but at least
works with the default settings. I had never been able to see this HTML
interface working!
KLUDGE -->
<script type="text/javascript" src="http://127.0.0.1:4223/pEp_functions.js"></script>
<script type="text/javascript" src="pEp_functions.js"></script>
<script type="text/javascript" src="interactive.js"></script>
<script type="text/javascript" src="unittests.js"></script>
<script type="text/javascript" src="test-encode-decode.js"></script>
@ -81,29 +76,6 @@
<button type="button" name="btn_doc" onclick="create_doc()">Create!</button></dd>
</form>
<h2>Ugly kludge</h2>
<p>
Notice that <code>pEp_functions.js</code> is loaded from the same server
providing the JSON API, and is not a file. I hardwired the URI to its default
value in the <code>&lt;script&gt;</code> element above:
<code>"http://127.0.0.1:4223/pEp_functions.js"</code>
In case you want to change, search for <code>KLUDGE</code> in this
<code>index.html</code>
<br/>
(But now this nice interface at least is usable.)
</p>
<p>
To circumvent errors such as
<pre>Access to XMLHttpRequest at 'http://127.0.0.1:4223/ja/0.1/callFunction' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.</pre>
I run a separate instance of my web browser, like this:
<pre>
[luca@moore ~]$ chromium --no-remote --disable-web-security --user-data-dir=$HOME/.config/chromium/Default ~/pep-src/pEpJSONServerAdapter/html/index.html</pre>
</p>
<p>
--positron, 2022-09
</p>
<div id="doc_out" style="background-color:white;border:1px black solid; padding:10px;"></div>
<script type="text/javascript">

File diff suppressed because one or more lines are too long

10909
html/jquery-3.6.1.js vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

1
html/jquery.js vendored

@ -1 +0,0 @@
jquery-3.6.1.js

@ -89,37 +89,4 @@ function handleFileSelect(evt)
}
// stolen from Stackoverflow
// https://stackoverflow.com/questions/9153718/change-the-style-of-an-entire-css-class-using-javascript
function cssrules() {
var rules = {};
for (var i=0; i<document.styleSheets.length; ++i) {
var cssRules = document.styleSheets[i].cssRules;
for (var j=0; j<cssRules.length; ++j)
rules[cssRules[j].selectorText] = cssRules[j];
}
return rules;
}
function css_getclass(name) {
var rules = cssrules();
if (!rules.hasOwnProperty(name))
throw 'TODO: deal_with_notfound_case: name="' + name + '"';
return rules[name];
}
// end of stackoverflow.
function toggle(name)
{
var ts = css_getclass('.' + name);
if(ts.style.display=='none')
{
ts.style.display='table-row';
}else{
ts.style.display='none';
}
}
document.getElementById('files').addEventListener('change', handleFileSelect, false);

@ -8,20 +8,22 @@ endif
# set to 'etpan' or 'pEpMIME'
MIME_LIB?=etpan
PREFIX?=$(HOME)/local
# pEp Dependencies
PEP_INC_PATH?=$(PREFIX)/include
# where pEp stuff is installed into:
PEP_LIB_PATH?=$(PREFIX)/lib
PEP_INCLUDE?=$(PREFIX)/include
# System Dependencies
SYS_INC_PATH?=/usr/local/include
SYS_LIB_PATH?=/usr/local/lib
# where libs from the packages systems are installed into:
LIBRARY_PATH?=/usr/local/lib
CFLAGS+=-std=c14 -fvisibility=hidden
CXXFLAGS+=-I$(SYS_INC_PATH) -I$(PEP_INC_PATH) -std=c++14 -fvisibility=hidden
LDFLAGS+=-std=c++14 -L$(PEP_LIB_PATH) -L$(SYS_LIB_PATH)
LDLIBS+= -lpEpEngine -lpEpAdapter -lpEpwebserver -lhogweed -lnettle -lgmp -lz -lsqlite3 -lpEpCxx11 -lstdc++
CXXFLAGS+= -I$(PEP_INCLUDE) -std=c++14 -fvisibility=hidden
LDFLAGS+=-std=c++14 -L$(PEP_LIB_PATH) -L$(LIBRARY_PATH)
LDLIBS+= -lpEpEngine -lpEpAdapter -lpEpwebserver -lasn1 \
-lsequoia_openpgp_ffi -lhogweed -lnettle -lgmp \
-lz -lsqlite3
# Boost naming postfix
BOOST_MT?=-mt
@ -30,14 +32,24 @@ BOOST_MT?=-mt
BUILD_ON:=$(shell uname)
BUILD_FOR=$(BUILD_ON)
ifeq ($(BUILD_ON),Darwin)
LDLIBS+= -liconv -lobjc -framework Foundation -framework Security
LDLIBS+= -lboost_filesystem$(BOOST_MT) -lboost_program_options$(BOOST_MT) -lboost_system$(BOOST_MT) -lboost_thread$(BOOST_MT) -lboost_regex$(BOOST_MT)
# ASAN is not strictly a MacOS/clang feature, but won't work with musl.
CXXFLAGS+= -fsanitize=address
LDFLAGS+= -fsanitize=address
ifeq ($(BUILD_FOR),Darwin)
LDLIBS+= -liconv -lobjc -framework Foundation -framework Security
LDLIBS+= -lboost_filesystem$(BOOST_MT) -lboost_program_options$(BOOST_MT) -lboost_system$(BOOST_MT) -lboost_thread$(BOOST_MT) -lboost_regex$(BOOST_MT)
# ASAN is not strictly a MacOS/clang feature, but won't work with musl.
CXXFLAGS+= -fsanitize=address
LDFLAGS+= -fsanitize=address
else
$(error I do not know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif
else ifeq ($(BUILD_ON),Linux)
LDLIBS+= -luuid -lboost_filesystem -lboost_program_options -lboost_system -lboost_thread -lboost_regex -lpthread -ldl
ifeq ($(BUILD_FOR),Linux)
LDLIBS+= -luuid \
-lboost_filesystem -lboost_program_options -lboost_system -lboost_thread -lboost_regex -lpthread -ldl
else
$(error I do not know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif
else
$(error I do not know how to make for $(BUILD_FOR) on $(BUILD_ON))
endif
@ -86,11 +98,10 @@ SPIRIT_OBJECTS=$(subst .cc,.o,$(SPIRIT_SOURCE))
TEST_SOURCE=$(wildcard unittest_*.cc)
TEST_OBJECTS=$(subst .cc,.o,$(TEST_SOURCE))
.PHONY: all test clean uninstall install
.PHONY: all
all: $(TARGET)
%.d: %.cc
@set -e; rm -f $@; \
$(CC) -MM $(CPPFLAGS) $(CFLAGS) $< > $@.$$$$; \
@ -110,7 +121,10 @@ $(LIB_TARGET): $(LIB_OBJECTS)
$(AR) -cr $@ $^
$(TARGET): $(LIB_TARGET) $(MA_OBJECTS) $(SPIRIT_OBJECTS)
$(CXX) $(LDFLAGS) $(MA_OBJECTS) $(SPIRIT_OBJECTS) $(LIB_TARGET) -o "$@" $(LDLIBS)
$(CXX) $(LDFLAGS) \
$(MA_OBJECTS) $(SPIRIT_OBJECTS) $(LIB_TARGET) \
-o "$@" $(LDLIBS)
unittests: $(TEST_OBJECTS) $(LIB_TARGET) $(SPIRIT_OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS) -lgtest -lgtest_main
@ -118,8 +132,10 @@ unittests: $(TEST_OBJECTS) $(LIB_TARGET) $(SPIRIT_OBJECTS)
parse_mail: parse_mail.o nfc.o $(LIB_TARGET) $(SPIRIT_OBJECTS)
$(CXX) $(LDFLAGS) -o $@ $^ $(LDLIBS)
.PHONY: test clean uninstall install
test: unittests
HOME=.; ./unittests
./unittests
install: $(TARGET)
mkdir -p $(DESTDIR)$(PREFIX)/include/pEp
@ -134,3 +150,47 @@ uninstall:
clean:
rm -vf *.a *.o */*.o *.d *.d.* $(TARGET) $(TESTS) encode_decode
local.conf:
@echo "# these are installation directories" >> local.conf
@echo "# ----------------------------------" >> local.conf
@echo >> local.conf
@echo "# pEp installation header file directory" >> local.conf
@echo "PEP_INCLUDE=$(PEP_INCLUDE)" >> local.conf
@echo >> local.conf
@echo "# installation destination for make install" >> local.conf
@echo "PREFIX?=$(PREFIX)" >> local.conf
@echo >> local.conf
@echo "# Additional options" >> local.conf
@echo "# ------------------" >> local.conf
@echo >> local.conf
@echo "# for a dynamically linked binary (for development) remove this." >> local.conf
@echo "# also add -L<path> here if .a or .so files from non-standard paths are needed." >> local.conf
@echo "# If you are using clang, it's \"-static\", but that will fail if you did not compile a static version of libcrt0 and libc[++] yourself." >> local.conf
@echo "LDFLAGS+=--static" >> local.conf
@echo >> local.conf
@echo "# Building BOOST yourself, the artefact names are not postfixed by deafult" >> local.conf
@echo "# E.g. lib is named \"libboost_regex.a\", not \"libboost_regex-mt.a\"." >> local.conf
@echo "# Set to empty string if this is the case for you." >> local.conf
@echo "BOOST_MT=\"-mt\"" >> local.conf
@echo >> local.conf
@echo "# Path where pEp libraries are installed." >> local.conf
@echo "PEP_LIB_PATH=$(PEP_LIB_PATH)" >> local.conf
@echo >> local.conf
@echo "# Path where system libraries are installed." >> local.conf
@echo "LIBRARY_PATH=$(LIBRARY_PATH)" >> local.conf
@echo >> local.conf
@echo "# remove this for a debug build." >> local.conf
@echo "NDEBUG=yes" >> local.conf
help:
@echo "usage:"
@echo " make local.conf # optional"
@echo " generate a local.conf with default paths"
@echo
@echo " make libjson-adapter.a"
@echo " build adapter library"
@echo
@echo " make pEp-mini-json-adapter # default"
@echo " compile and link mini adapter"
@echo

@ -20,9 +20,8 @@
// libpEpAdapter:
#include <pEp/Adapter.hh>
#include <pEp/status_to_string.hh>
#include <pEp/std_utils.hh>
#include <pEp/slurp.hh>
#include <pEp/message_cache.hh>
#include <pEp/group_manager_api.h> // Yes, .h because it is a C API in libpEpAdapter!
#include <boost/filesystem.hpp>
#include "json_spirit/json_spirit_reader.h"
@ -185,7 +184,7 @@ const FunctionMap functions = {
FP( "revoke" , new FuncPC<PEP_STATUS, In_Pep_Session, In<c_string>, In<c_string>> ( &revoke_key) ),
FP( "key_expired" , new FuncPC<PEP_STATUS, In_Pep_Session, In<c_string>, In<time_t>, Out<bool>> ( &key_expired) ),
FP( "from openpgp_compat.h", new Separator),
FP( "from blacklist.h & OpenPGP_compat.h", new Separator),
FP( "OpenPGP_list_keyinfo", new FuncPC<PEP_STATUS, In_Pep_Session, In<c_string>, Out<stringpair_list_t*>> ( &OpenPGP_list_keyinfo) ),
FP( "Event Listener & Results", new Separator ),
@ -202,23 +201,13 @@ const FunctionMap functions = {
FP( "enable_identity_for_sync" , new FuncPC<PEP_STATUS, In_Pep_Session, InOut<pEp_identity*>> (&enable_identity_for_sync)),
FP( "disable_identity_for_sync", new FuncPC<PEP_STATUS, In_Pep_Session, InOut<pEp_identity*>> (&disable_identity_for_sync)),
FP( "disable_all_sync_channels", new Func<PEP_STATUS, In_Pep_Session> (&disable_all_sync_channels)),
FP( "Group Manager API", new Separator),
FP( "adapter_group_create" , new Func<PEP_STATUS, In_Pep_Session, InOut<pEp_identity*>, InOut<pEp_identity*>, InOut<identity_list*>> (&adapter_group_create)),
FP( "adapter_group_dissolve" , new Func<PEP_STATUS, In_Pep_Session, In<pEp_identity*>, In<pEp_identity*>> (&adapter_group_dissolve)),
FP( "adapter_group_invite_member", new Func<PEP_STATUS, In_Pep_Session, In<pEp_identity*>, In<pEp_identity*>> (&adapter_group_invite_member)),
FP( "adapter_group_remove_member", new Func<PEP_STATUS, In_Pep_Session, In<pEp_identity*>, In<pEp_identity*>> (&adapter_group_remove_member)),
FP( "adapter_group_join" , new Func<PEP_STATUS, In_Pep_Session, In<pEp_identity*>, In<pEp_identity*>> (&adapter_group_join)),
FP( "adapter_group_query_groups" , new Func<PEP_STATUS, In_Pep_Session, Out<identity_list*>> (&adapter_group_query_groups)),
FP( "adapter_group_query_manager", new Func<PEP_STATUS, In_Pep_Session, In<const pEp_identity*>, Out<pEp_identity*>> (&adapter_group_query_manager)),
FP( "adapter_group_query_members", new Func<PEP_STATUS, In_Pep_Session, In<const pEp_identity*>, Out<identity_list*>> (&adapter_group_query_members)),
#ifndef JSON_ADAPTER_LIBRARY
FP( "startSync", new Func<void> (&pEp::mini::startSync) ),
FP( "stopSync" , new Func<void> (&pEp::mini::stopSync) ),
#else
FP( "startSync", new Func<void> (&pEp::Adapter::start_sync) ),
FP( "stopSync" , new Func<void> (&pEp::Adapter::stop_sync) ),
FP( "startSync", new Func<void> (&pEp::CallbackDispatcher::start_sync) ),
FP( "stopSync" , new Func<void> (&pEp::CallbackDispatcher::stop_sync) ),
#endif
// my own example function that does something useful. :-)
FP( "Other", new Separator ),
@ -269,7 +258,7 @@ pEp::Webserver::response ev_server::sendReplyString(const pEp::Webserver::reques
pEp::Webserver::response ev_server::sendFile(const pEp::Webserver::request& req, const char* mimeType, const fs::path& fileName)
{
// not the best for big files, but this server does not send big files. :-)
std::string fileContent = pEp::Utils::file_read(fileName.string());
std::string fileContent = pEp::slurp(fileName.string());
return sendReplyString(req, mimeType, std::move(fileContent));
}
@ -291,9 +280,9 @@ pEp::Webserver::response ev_server::OnOtherRequest(boost::cmatch match, const pE
{ "/favicon.ico" , {"image/vnd.microsoft.icon", path_to_html / "json-test.ico"} },
};
const std::string path = std::string(req.target()); // NB: is percent-encoded! does not relevant for the supported paths above.
const std::string path = req.target().to_string(); // NB: is percent-encoded! does not relevant for the supported paths above.
DEBUG_LOG( Log() ) << "** Request: [" << std::string(req.method_string()) << "] " << "Path: [" + path + "]";
DEBUG_LOG( Log() ) << "** Request: [" << req.method_string().to_string() << "] " << "Path: [" + path + "]";
try{
const auto q = files.find(path);
@ -418,7 +407,7 @@ void ev_server::addSharks()
void ev_server::thread_init()
{
pEp::Adapter::session.initialize();
// nothing to do, yet.
}

@ -1,41 +1,21 @@
# This is an Example build config file (local.conf)
# The example values reflect the defaults.
# Rename this file to local.conf and tweak the values to your needs,
# if you need to override anything. (Most likely PREFIX)
# you might not need this file, but if the defaults dont work for you
# You can override them here.
# Tweak the values to your needs and rename it to local.conf
# Toolchain
# ---------
# Should work with `g++` and `clang`
# CXX=
######### C++ Compiler #########
# Should work with clang and g++
# CXX=g++
# You might use /usr/bin/ar on MacOS explicitly if you have GNU ar installed via HomeBrew,
# because it is installed in /usr/local/bin and therefore used by default.
# AR=ar
# DIRS
# ----
# PREFIX=$(HOME)/local
# pEp Dependencies
# PEP_INC_PATH=$(PREFIX)/include
# PEP_LIB_PATH=$(PREFIX)/lib
# System Dependencies
# SYS_INC_PATH=/usr/local/include
# SYS_LIB_PATH=/usr/local/lib
# Additional Options
# ------------------
# DEBUG=1 # DEBUG Build (Default)
# DEBUG=0 # RELEASE Build
# Static/Dynamic Linkage
# for a dynamically linked binary (for development) leave this empty.
# If you are using clang, use "-static", but that will fail if you did not compile a static
# version of libcrt0 and libc[++] yourself.
# LDFLAGS+=
############# DIRS #############
# PREFIX=$(HOME)/local
# Building BOOST yourself, the artefact names are not postfixed by default
# E.g. lib is named "libboost_regex.a", not "libboost_regex-mt.a".
# Set to empty string if this is the case for you.
# BOOST_MT="-mt"
# where the other pEp-specific includes (e.g. pEpEngine, libpEpAdapter) are installed
# PEP_INCLUDE=$(PREFIX)/include

@ -20,7 +20,7 @@ namespace mini {
protected:
virtual inject_sync_event_t getInjectSyncEvent() const override
{
return &::pEp::Adapter::_cb_inject_sync_event_enqueue_sync_event;
return &::pEp::Adapter::_inject_sync_event;
}
};

@ -127,10 +127,22 @@ try
if( debug_mode == false && !foreground )
daemonize (!debug_mode, (const uintptr_t) status_handle);
pEp::callback_dispatcher.add(JsonAdapter::messageToSend, JsonAdapter::notifyHandshake);
pEp::Adapter::session.initialize();
pEp::callback_dispatcher.add(JsonAdapter::messageToSend, JsonAdapter::notifyHandshake);
// create a dummy session just to see whether the Engine is functional.
// reason: here we still can log errors to stderr, because prepare_run() is called before daemonize().
PEP_STATUS status = pEp::call_with_lock(&init, &first_session, pEp::CallbackDispatcher::messageToSend, pEp::Adapter::_inject_sync_event, pEp::Adapter::_ensure_passphrase);
if(status != PEP_STATUS_OK || first_session==nullptr)
{
const std::string error_msg = "Cannot create first session! PEP_STATUS: " + ::pEp::status_to_string(status) + ".";
std::cerr << error_msg << std::endl; // Log to stderr intentionally, so Enigmail can grab that error message easily.
if( ! ignore_missing_session)
{
throw std::runtime_error(error_msg);
}
}
JsonAdapter& ja = pEp::mini::Adapter::createInstance();
ja.ignore_session_errors( ignore_missing_session)
.deliver_html( !no_html )
@ -165,8 +177,8 @@ try
}
ja.shutdown(nullptr);
ja.Log() << "Good bye. :-)";
pEp::Adapter::session.release();
pEp::callback_dispatcher.remove(JsonAdapter::messageToSend);
pEp::call_with_lock(&release, first_session);
pEp::callback_dispatcher.remove(JsonAdapter::messageToSend);
}
catch(std::exception const& e)
{

@ -416,23 +416,6 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x0859, 220},
{0x085A, 220},
{0x085B, 220},
{0x0898, 230},
{0x0899, 220},
{0x089A, 220},
{0x089B, 220},
{0x089C, 230},
{0x089D, 230},
{0x089E, 230},
{0x089F, 230},
{0x08CA, 230},
{0x08CB, 230},
{0x08CC, 230},
{0x08CD, 230},
{0x08CE, 230},
{0x08CF, 220},
{0x08D0, 220},
{0x08D1, 220},
{0x08D2, 220},
{0x08D3, 220},
{0x08D4, 230},
{0x08D5, 230},
@ -493,7 +476,6 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x0B3C, 7},
{0x0B4D, 9},
{0x0BCD, 9},
{0x0C3C, 7},
{0x0C4D, 9},
{0x0C55, 84},
{0x0C56, 91},
@ -544,7 +526,6 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x135E, 230},
{0x135F, 230},
{0x1714, 9},
{0x1715, 9},
{0x1734, 9},
{0x17D2, 9},
{0x17DD, 230},
@ -580,20 +561,6 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x1ABD, 220},
{0x1ABF, 220},
{0x1AC0, 220},
{0x1AC1, 230},
{0x1AC2, 230},
{0x1AC3, 220},
{0x1AC4, 220},
{0x1AC5, 230},
{0x1AC6, 230},
{0x1AC7, 230},
{0x1AC8, 230},
{0x1AC9, 230},
{0x1ACA, 220},
{0x1ACB, 230},
{0x1ACC, 230},
{0x1ACD, 230},
{0x1ACE, 230},
{0x1B34, 7},
{0x1B44, 9},
{0x1B6B, 230},
@ -696,7 +663,6 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x1DF7, 228},
{0x1DF8, 228},
{0x1DF9, 220},
{0x1DFA, 218},
{0x1DFB, 230},
{0x1DFC, 233},
{0x1DFD, 220},
@ -874,12 +840,7 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x10F4E, 220},
{0x10F4F, 220},
{0x10F50, 220},
{0x10F82, 230},
{0x10F83, 220},
{0x10F84, 230},
{0x10F85, 220},
{0x11046, 9},
{0x11070, 9},
{0x1107F, 9},
{0x110B9, 9},
{0x110BA, 7},
@ -1028,7 +989,6 @@ const std::map<unsigned, unsigned char> NFC_CombiningClass = {
{0x1E134, 230},
{0x1E135, 230},
{0x1E136, 230},
{0x1E2AE, 230},
{0x1E2EC, 230},
{0x1E2ED, 230},
{0x1E2EE, 230},

@ -102,12 +102,6 @@ Out<identity_list*>::~Out()
value=nullptr;
}
template<>
In<identity_list*>::~In()
{
free_identity_list(value);
}
template<>
In<const identity_list*>::~In()
{

@ -2,7 +2,7 @@
#include <pEp/mime.h>
#include <pEp/status_to_string.hh>
#include <pEp/std_utils.hh>
#include <pEp/slurp.hh>
#include "pEp-types.hh"
#include <string>
#include <iostream>

@ -8,7 +8,7 @@
#include <boost/algorithm/string/trim.hpp>
#include "json_spirit/json_spirit_reader.h"
#include <pEp/std_utils.hh>
#include <pEp/slurp.hh>
namespace js = json_spirit;
@ -81,14 +81,8 @@ static const std::string VersionName =
// "(47a) Erfurt-Ost"; // JSON-160, JSON-172, JSON-179.
// "(47b) Erfurt-Vieselbach"; // JSON-183: "Provide an API for pEp4Tb to communicate whether the message subject should be hidden (replaced with pEp)"
// "(48) Nohra"; // FPMAIL-412, P4TB-400: add import_key_with_fpr_return()
// "(49) Weimar"; // (forthcoming) P4TB-414: new decrypt_message arg, new message field rating
//////////////////////
// 49...55 are skipped for futher Releases of the 2.1 branch, if necessary.
//////////////////////
"(56a) Hermsdorfer Kreuz"; // JSON-197: Group Encryption, Engine 3.1 branch.
"(49) Weimar"; // (forthcoming) P4TB-414: new decrypt_message arg, new message field rating
} // end of anonymous namespace
////////////////////////////////////////////////////////////////////////////
@ -137,10 +131,7 @@ const ServerVersion& server_version()
// version using a specific series (2.x or 3.x) while both series evolve in
// parallel, even in incompatible ways.
//static const ServerVersion sv(3,1,0); // JSON-197: Group Encryption. 3.1 branch of Engine & JSON Adapter
//static const ServerVersion sv(3,22,4); // (forthcoming) P4TB-414: new decrypt_message arg, new message field rating
static const ServerVersion sv(3,22,5); // cherry-picking JSON changes from Release_3.1 before retiring the branch
static const ServerVersion sv(3,22,4); // (forthcoming) P4TB-414: new decrypt_message arg, new message field rating
return sv;
}
@ -159,7 +150,7 @@ ServerVersion::ServerVersion(unsigned maj, unsigned min, unsigned p)
const std::string file_content =
boost::algorithm::trim_copy(
pEp::Utils::file_read("PackageVersion")
pEp::slurp("PackageVersion")
);
try{

Loading…
Cancel
Save