Comments (8)
If you use go-sqlcipher you should be able to use dqlite by:
- get the sqlcipher code base
- apply the dqlite replication patch that I mentioned above to sqlcipher's fork of the sqlite code (you might want to ask them help here as they probably have their own scripts to maintain their fork)
- build the sqlite library from the patched sqlcipher (./configure etc)
- put the built .so object your library path and build your Go project passing
-tags libsqlite3
as build tag, that will make go-sqlcipher use the .so object
If for any reason the dqlite replication patch doesn't apply cleanly, let me know, and I'll see what I can do.
from dqlite.
@krzysztofantczak -- any results to share with the project?
from dqlite.
Hello,
if sqlcipher works with WAL journalling mode (PRAGMA journal_mode=wal
), I see no reason why it should not be possible. I didn't look at the sqlcipher patch though, do you have a link to it? They don't seem to publish one.
In any case, you could apply on top of the sqlcipher git tree the replication patch that dqlite depends on, compile and modify the dqlite demo program under testdata/demo.go
to use encryption, and see if it works.
from dqlite.
Yes, it works with WAL. As for the other part - no idea. At this moment i'm using it thru https://github.com/xeodou/go-sqlcipher - so... i'm not that much on to low level stuff yet.
from dqlite.
Ok, this is what i have tried so far: https://gist.github.com/krzysztofantczak/6f2816b6206ec7b72bed8af45e6b786a
And that's the result:
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
from dqlite.
Yeah that's expected. Maybe I was not clear enough in my previous comment. The sqlcipher code base does not seem to be a normal fork of the sqlite source tree (in that case the dqlite patch should mostly work), they appear to have their own way to get the sqlite source tree and patching it. I don't know the details of how that works, that's why I suggested that you ask the slqcipher guys what's the best way to apply a patch to their sqlite fork. You can for example link the dqlite patch, or even point them to this issue.
from dqlite.
Ok, after some manual changes, i was able to build .so file - with Your patch and sqlcipher code base. Not sure if it will work as expected, but... I'll try to create some test app with it end report my results if You want.
from dqlite.
Great, let me know.
from dqlite.
Related Issues (20)
- Moving sqlite3_step and other database operations off the main thread HOT 8
- Expose option to disable/enable raft snapshot compression
- Handle INTERRUPT request HOT 3
- stderr of server threads swallowed during integration tests HOT 2
- Proposal: stop trying to handle OOM HOT 1
- Investigate growing memory usage found by microk8s benchmarking HOT 2
- Consider shipping a tiny "manifest" binary to print information about the dqlite installation
- install instructions don't work HOT 4
- Confusing error message when trying to run a query statement with Exec HOT 1
- Recommended way to perform schema migrations HOT 4
- Raft uv_timer leak when creating and destroying node HOT 1
- Cluster-wide configuration of target voter/standby count
- Idea: pass a socket instead of dqlite_node_set_bind_address HOT 4
- Implement DQLITE_VISIBLE_TO_TESTS properly, or get rid of it HOT 1
- Git layout for v1.15.0 HOT 8
- Write operations that immediately follow write operations sometimes cause a disk I/O-error, followed by loss of leadership and high latency HOT 3
- Support the RETURNING clause HOT 2
- Can we use the unix-excl VFS? HOT 9
- Consider periodically using VACUUM to reduce memory footprint HOT 9
- Not Leader failure response HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dqlite.