Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
a89e85e
Add blinded community session encrypt functions
Doy-lee Dec 15, 2025
44d5e33
Added SQLCipher dependency, started testing database access
mpretty-cyro Mar 19, 2025
e1b27e0
Merge in wip-SQLite branch
Doy-lee Oct 22, 2025
cd32d82
Update pre-requisite dependencies line
Doy-lee Oct 23, 2025
7717345
Remove defines from database.cpp, use target_compile_definitions
Doy-lee Oct 23, 2025
780881d
Add pro revocation add/get/delete from SQL DB APIs
Doy-lee Oct 23, 2025
696850f
Make pro backend server tests off by default, specify URL to let it run
Doy-lee Oct 27, 2025
ff5c229
Bundle the revocation ticket with the get/setter as they come togethe…
Doy-lee Oct 27, 2025
d31ecb8
Introuce managed libsession context to maintain runtime state
Doy-lee Oct 29, 2025
c8d2d78
Add C interface for database connections
Doy-lee Oct 29, 2025
d65dceb
Add C api for libsession core context
Doy-lee Oct 30, 2025
edbd925
Document the role of core.hpp and connection.hpp
Doy-lee Oct 31, 2025
2a502ce
Add connection close to CPP db layer
Doy-lee Nov 2, 2025
2a90ebd
Allow storing of private keys into the DB
Doy-lee Dec 4, 2025
9fb8926
Separate pro backend dev server tests from the main test block
Doy-lee Dec 11, 2025
277d4d7
Fix pro backend tests not being skipped if server URL is not specified
Doy-lee Jan 5, 2026
0404f95
Add open DB to core API which restores state from DB
Doy-lee Jan 5, 2026
78ac664
Update readme build instructions
Doy-lee Jan 8, 2026
7003da7
Switch to system_or_submodule sqlcipher 4.12 from vendored 4.6.1
Doy-lee Jan 8, 2026
483259c
Add locking to Core APIs and update usage guide
Doy-lee Jan 8, 2026
8d0bdb3
Linting
Doy-lee Jan 8, 2026
aa0cd00
Move types.cpp into the util layer where it belongs
Doy-lee Jan 9, 2026
bd0d95e
Bump Core placement new buffer to atleast 184b for debian sid
Doy-lee Jan 9, 2026
bc5f73c
Copy the frameworks to link to verbatim to avoid fixing CMake crap
Doy-lee Jan 9, 2026
378c514
SQLCipher v4.12.0 checks for SQLCIPHER_CRYPTO_CC instead of SQLCIPHER…
Doy-lee Jan 9, 2026
453aca5
Bump core opaque placement new buffer to 208b for apple clang
Doy-lee Jan 9, 2026
c80e18c
Introduce libsession-services high-level APIs that use primitives pro…
Doy-lee Jan 9, 2026
70aea95
Explicitly delimit the sqlcipher_link_libs for Apple to try and stop …
Doy-lee Jan 9, 2026
6dd40d6
Fix build when database is disabled
Doy-lee Jan 9, 2026
0f46191
Remove unused static/cross-compiling vars in external/CMakeLists.txt
Doy-lee Jan 11, 2026
d8cd25c
Pass cross-compiling host args to SQLCipher build
Doy-lee Jan 11, 2026
e1f3c4b
Add static OpenSSL build capabilities to link to SQLCipher
Doy-lee Jan 11, 2026
43632de
Require specific OpenSSL version in SQLCipher
Doy-lee Jan 12, 2026
3c75fea
Do not require OpenSSL immediately for SQLCipher
Doy-lee Jan 12, 2026
90ed01e
Explicitly define that SQLCipher depends on OpenSSL for non-Apple builds
Doy-lee Jan 12, 2026
e6c962a
We lookup libraries via pkgconfig which defines openssl::openssl for us
Doy-lee Jan 12, 2026
3bb7125
SQLCiper+OpenSSL requires -lm
Doy-lee Jan 12, 2026
09949e4
Export OPENSSL_LIBRARIES to set SQLCipher's LDFLAGS in pkg/non-pkg co…
Doy-lee Jan 12, 2026
c201f21
Try removing the X_VERSION variable incase pkgconfig found a match bu…
Doy-lee Jan 12, 2026
84bf597
Try work-around OPENSSL_VERSION getting blanked out on CI machines
Doy-lee Jan 13, 2026
35c851e
Set explicit link path when using submodule OpenSSL
Doy-lee Jan 13, 2026
8c1a448
Use updated cross compiling cmake impl for SQLCipher
Doy-lee Jan 13, 2026
2790385
Augment SQLCipher build w/ OpenSSL include dir, fixes static android …
Doy-lee Jan 13, 2026
c12cf96
Add Android's liblog required for SQLite/cipher
Doy-lee Jan 13, 2026
8ce54e1
Specify NDK sysroot for OpenSSL
Doy-lee Jan 13, 2026
83b508a
TEST: Try removing WIN32 guard for OpenSSL for the static windows x64…
Doy-lee Jan 13, 2026
1753038
Specify NDK sysroot before config options for OpenSSL
Doy-lee Jan 13, 2026
7a14966
Use updated method to pass toolchain for MINGW re: NOTES-WINDOWS.md f…
Doy-lee Jan 13, 2026
5108ca8
Switch to the modern Configure tool for OpenSSL
Doy-lee Jan 13, 2026
64a9894
Specify correct android target for OpenSSL Configure
Doy-lee Jan 13, 2026
09086ba
Switch to arm target for armeabi
Doy-lee Jan 13, 2026
de9f44b
TEMP: Test arm64 for 32 bit OpenSSL hack
Doy-lee Jan 13, 2026
f2945f6
Cross-compile-prefix for mingw breaks ccache hijacking
Doy-lee Jan 13, 2026
4490bfb
Ensure ws2_32 crypt32 is available for mingw
Doy-lee Jan 13, 2026
718d0a1
Specify the exact library to build for sqlcipher
Doy-lee Jan 13, 2026
15e824d
Add work-around for sqlite3.exe being built on windows
Doy-lee Jan 13, 2026
96ed6a9
Try getting ccache working w/ mingw openssl build again, try fix andr…
Doy-lee Jan 13, 2026
9d6a28a
Ensure WINDRES is set for mingw OpenSSL cross compile
Doy-lee Jan 13, 2026
d419c7a
OpenSSL uses RC= for Win32 resource compiler, set the NDK sysroot for…
Doy-lee Jan 13, 2026
bc7279d
Specify the correct sysroot for the android NDK toolchain in OpenSSL
Doy-lee Jan 13, 2026
5871b2c
Help OpenSSL android static vbuild find asm/types.h
Doy-lee Jan 14, 2026
5c7caac
TEMP: Apple triple check
Doy-lee Jan 14, 2026
6d46c40
Apple does not need to build OpenSSL so skip it entirely
Doy-lee Jan 14, 2026
8673e75
Use apple arch flags from oxen-libquic staticbuild
Doy-lee Jan 14, 2026
c4a9f44
Explicitly install just the SQLCipher headers and library
Doy-lee Jan 15, 2026
3696239
TEMP: Try not matching against android x86
Doy-lee Jan 15, 2026
e07b4e4
OpenSSL build only static libs and install development items _only_
Doy-lee Jan 15, 2026
35651fd
Apparently Android NDK does not have libmath, it's included in GLIBC …
Doy-lee Jan 15, 2026
909e955
Test removing -lm entirely from SQLCipher
Doy-lee Jan 15, 2026
0ddff80
Assist SQLCipher in finding the liblog directory
Doy-lee Jan 15, 2026
76452c2
All Android targets need help finding the liblog folder for SQLCipher
Doy-lee Jan 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,6 @@
[submodule "external/simdutf"]
path = external/simdutf
url = https://github.com/simdutf/simdutf.git
[submodule "external/sqlcipher"]
path = external/sqlcipher
url = https://github.com/sqlcipher/sqlcipher
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ option(USE_LTO "Use Link-Time Optimization" ${use_lto_default})
# Provide this as an option for now because GMP and Desktop are sometimes unhappy with each other.
option(ENABLE_ONIONREQ "Build with onion request functionality" ON)

# Provide this as an option for now so clients that don't use any database logic can exclude it.
option(ENABLE_DATABASE "Build with database functionality" ON)

if(USE_LTO)
include(CheckIPOSupported)
check_ipo_supported(RESULT IPO_ENABLED OUTPUT ipo_error)
Expand Down Expand Up @@ -136,10 +139,6 @@ endif()
add_subdirectory(src)
add_subdirectory(proto)

if (BUILD_STATIC_DEPS)
include(StaticBuild)
endif()

if(STATIC_BUNDLE)

include(combine_archives)
Expand Down
42 changes: 28 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,47 @@
## Build

```
# Pre-requisites
apt install cmake build-essential git libssl-dev m4 pkg-config ninja-build

# Configure the build
#
# Options
# Enable APIs for creating onion-requests with:
# - Build libsession with its dependencies statically linked into the library (default: ON)
#
# -D BUILD_STATIC_DEPS=ON
#
# This currently influences top-level dependencies and forces OpenSSL on Linux/Windows to be
# statically linked into SQLCipher for database support.
#
# - Enable APIs for creating onion-requests with (default: ON)
#
# -D ENABLE_ONIONREQ=ON
#
# - Enable SQLCipher database support (default: ON)
#
# -D ENABLE_ONIONERQ
# -D ENABLE_DATABASE=ON
#
# Enable testing of a Session Pro Backend by defining on the configure line:
# - Enable testing of a Session Pro Backend by defining on the configure line (default: OFF)
#
# -D TEST_PRO_BACKEND_WITH_DEV_SERVER=1
# -D TEST_PRO_BACKEND_WITH_DEV_SERVER=ON
#
# These tests require the Session Pro Backend running in development mode (SESH_PRO_BACKEND_DEV=1)
# to be running and tests the request and response flow of registering, updating and revoking
# Session Pro from the development backend. You must also have a libcurl available such that
# `find_package(CURL)` succeeds (e.g. a system installed libcurl) for this to compile
# successfully.
# These tests require the Session Pro Backend running in development mode
# (SESH_PRO_BACKEND_DEV=1) to be running and tests the request and response flow of registering,
# updating and revoking Session Pro from the development backend. You must also have a libcurl
# available such that `find_package(CURL)` succeeds (e.g. a system installed libcurl) for this
# to compile successfully.
#
# By default, it contacts http://127.0.0.1:5000 but this URL can be changed using the CLI arg
# --pro-backend-dev-server-url="<url>" when invoking the test suite.
# These tests do not run by default, they can be invoked by passing the dev server URL in the
# CLI arg --pro-backend-dev-server-url="<url>" when invoking the test suite.
#
cmake -G Ninja -S . -B Build

# Regenerate protobuf files
cmake --build Build --target regen-protobuf --parallel --verbose

# Build
cmake --build Build --parallel --verbose

# Regenerate protobuf files
cmake --build Build --target regen-protobuf --parallel --verbose
```

## Docs
Expand Down
224 changes: 0 additions & 224 deletions cmake/StaticBuild.cmake

This file was deleted.

Loading