Sqlcipher and sqlite patch from CanonicalLtd



I was redirected here from https://github.com/sqlcipher/sqlcipher/issues/246 - not sure why really, so, now i have two questions :wink:

Will it became an sqlcipher issue, when/if this patch hits sqlite upstream? I was just wondering how hard would it be to apply this patch in the code base. It obviously doesn’t work out of the box and it seems i’m not good enough with low level stuff to handle it on my own :frowning:

My original POST from GH issue below:


Is it somehow possible, to apply dqlite (https://github.com/CanonicalLtd/dqlite) patch (https://github.com/CanonicalLtd/sqlite/commit/2a9aa8b056f37ae05f38835182a2856ffc95aee4) to sqlcipher code base? Any chance those two will work together?

Here’s similar question i asked on dqlite repo.

What i have tried: https://gist.github.com/krzysztofantczak/6f2816b6206ec7b72bed8af45e6b786a
Which results with:

error: patch failed: src/pager.c:4103
error: src/pager.c: patch does not apply
error: patch failed: src/pager.h:178
error: src/pager.h: patch does not apply
error: patch failed: src/sqlite.h.in:8503
error: src/sqlite.h.in: patch does not apply
error: patch failed: src/wal.h:38
error: src/wal.h: patch does not apply


Hi @krzysztofantczak

Thank you for your interest in SQLCipher. We have read your recent reply mentioning that you were able to build the shared library with the patch based on the SQLCipher source. While we are unfamiliar with the dqlite project, SQLCipher does merge the upstream SQLite source tree after a stabilization period has lapsed following their release cycle. If dqlite were to be accepted into the mainline SQLite source, we would evaluate it’s integration at that time.

Should your organization need specific support for a customized build of SQLCipher, please feel free to reach out to us at support@zetetic.net for further discussion. Thanks!