aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap/sqlite/sqlite.diff
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-01-22 04:15:54 +0000
committerlloyd <[email protected]>2010-01-22 04:15:54 +0000
commitc9672d69689b7bdbec89ab2a9193aaca948acb76 (patch)
tree7face090ccdf6fd6ba6742d42cc8a86f1f29eef2 /src/wrap/sqlite/sqlite.diff
parent59471c89f3ef3f9c65fa5f05b1a2159d5b63d200 (diff)
Add SQLite3 encryption codec, contributed by Olivier de Gaalon. Uses
Twofish in XTS mode for encryption by default, but is easily tweakable.
Diffstat (limited to 'src/wrap/sqlite/sqlite.diff')
-rw-r--r--src/wrap/sqlite/sqlite.diff77
1 files changed, 77 insertions, 0 deletions
diff --git a/src/wrap/sqlite/sqlite.diff b/src/wrap/sqlite/sqlite.diff
new file mode 100644
index 000000000..1a3ef764c
--- /dev/null
+++ b/src/wrap/sqlite/sqlite.diff
@@ -0,0 +1,77 @@
+--- Makefile.in.orig 2009-10-30 09:34:59.000000000 -0400
++++ Makefile.in 2010-01-21 22:51:22.000000000 -0500
+@@ -133,7 +133,10 @@
+ GCOV_LDFLAGS1 = -lgcov
+ USE_GCOV = @USE_GCOV@
+ LTCOMPILE_EXTRAS += $(GCOV_CFLAGS$(USE_GCOV))
++LTCOMPILE_EXTRAS += -DSQLITE_HAS_CODEC
+ LTLINK_EXTRAS += $(GCOV_LDFLAGS$(USE_GCOV))
++LTLINK_EXTRAS += -lstdc++
++LTLINK_EXTRAS += -lbotan
+
+
+ # The directory into which to store package information for
+@@ -176,7 +179,8 @@
+ table.lo tokenize.lo trigger.lo update.lo \
+ util.lo vacuum.lo \
+ vdbe.lo vdbeapi.lo vdbeaux.lo vdbeblob.lo vdbemem.lo \
+- walker.lo where.lo utf.lo vtab.lo
++ walker.lo where.lo utf.lo vtab.lo \
++ codec.lo codecext.lo
+
+ # Object files for the amalgamation.
+ #
+@@ -275,7 +279,10 @@
+ $(TOP)/src/vdbeInt.h \
+ $(TOP)/src/vtab.c \
+ $(TOP)/src/walker.c \
+- $(TOP)/src/where.c
++ $(TOP)/src/where.c \
++ $(TOP)/src/botan/codec.cpp \
++ $(TOP)/src/botan/codecext.cpp \
++ $(TOP)/src/botan/codec.h
+
+ # Generated source code files
+ #
+@@ -411,6 +418,7 @@
+ $(TOP)/src/sqlite3ext.h \
+ $(TOP)/src/sqliteInt.h \
+ $(TOP)/src/vdbe.h \
++ $(TOP)/src/botan/codec.h \
+ $(TOP)/src/vdbeInt.h \
+ parse.h \
+ config.h
+@@ -622,6 +630,13 @@
+ notify.lo: $(TOP)/src/notify.c $(HDR)
+ $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/notify.c
+
++codec.lo: $(TOP)/src/botan/codec.cpp $(HDR) $(TOP)/src/botan/codec.h
++ $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/botan/codec.cpp
++
++codecext.lo: $(TOP)/src/botan/codecext.cpp $(HDR) $(TOP)/src/botan/codec.h
++ $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/botan/codecext.cpp
++
++
+ pager.lo: $(TOP)/src/pager.c $(HDR) $(TOP)/src/pager.h
+ $(LTCOMPILE) $(TEMP_STORE) -c $(TOP)/src/pager.c
+
+--- src/pager.c.orig 2009-10-30 17:01:07.000000000 -0400
++++ src/pager.c 2010-01-21 22:51:53.000000000 -0500
+@@ -5046,7 +5046,7 @@
+ /*
+ ** Set or retrieve the codec for this pager
+ */
+-static void sqlite3PagerSetCodec(
++void sqlite3PagerSetCodec(
+ Pager *pPager,
+ void *(*xCodec)(void*,void*,Pgno,int),
+ void (*xCodecSizeChng)(void*,int,int),
+@@ -5060,7 +5060,7 @@
+ pPager->pCodec = pCodec;
+ pagerReportSize(pPager);
+ }
+-static void *sqlite3PagerGetCodec(Pager *pPager){
++void *sqlite3PagerGetCodec(Pager *pPager){
+ return pPager->pCodec;
+ }
+ #endif