Commit Graph

904 Commits

Author SHA1 Message Date
Sebastian Messmer
ca68102a50 Prefer repository-cryptopp to system installed one 2018-05-20 19:21:59 -07:00
Sebastian Messmer
ccdb091a84 Fix subprocess on osx 2018-05-20 19:21:58 -07:00
Sebastian Messmer
d0fb8b8412 Make ThreadSystem work on windows 2018-05-20 19:21:58 -07:00
Sebastian Messmer
736052b0ee Make daemonize() work on windows 2018-05-20 19:21:58 -07:00
Sebastian Messmer
f2831c0426 Rewrite subprocess and add test cases for it 2018-05-20 19:21:58 -07:00
Sebastian Messmer
3296ae92f7 Make subprocess work on windows 2018-05-20 19:21:58 -07:00
Sebastian Messmer
d7e95606f6 Backtrace library is only needed on linux 2018-05-20 19:21:58 -07:00
Sebastian Messmer
e5d8bf82c3 Make DontEchoStdinToStdoutRAII work on windows 2018-05-20 19:21:58 -07:00
Sebastian Messmer
eb8682887f Increased scrypt hardness to (N=1048576, r=4, p=8) to make it harder to crack the key while allowing cryfs to take advantage of multicore machines. 2018-05-20 19:21:09 -07:00
Sebastian Messmer
fede748ff4 Use cryptopp scrypt instead of vendor/scrypt one 2018-05-20 19:21:09 -07:00
Sebastian Messmer
6dbee297ce Use cryptopp from vendor/ instead of system 2018-05-20 19:20:45 -07:00
0x4D616E75
1a2036749c Remove usage of old behavior from cmake 2.8 policy (#217)
* fix linking of fuse in cryfs-cli, linking of cpp-utils in cryfs tests and remove cmake policy to use behaviors of cmake 2.8 instead of 3.0

* setting link dependencies in cryfs project to public, remove transitive dependencies from cryfs-cli project and cryfs test project

* set gtest and gmock link dependencies from private to public in googletest project
2018-05-20 15:13:49 -07:00
Sebastian Messmer
b49435f405 Fix logging for older compilers 2018-05-18 22:29:52 -07:00
Sebastian Messmer
b715e18a59 Fix non-windows backtrace implementation 2018-05-18 22:29:41 -07:00
Sebastian Messmer
e4d1f44c2a Cleanup CMakeLists.txt 2018-05-18 22:29:04 -07:00
0x4D616E75
5db592bcc2 fix loading of CURL and Backtracing library with CMake (#215)
to build on FreeBSD with default compiler (Clang 4.0)
2018-05-17 09:55:15 -07:00
Sebastian Messmer
a686129243 Make cpputils::time::now() work on windows 2018-05-17 06:37:47 -07:00
Sebastian Messmer
9d872ea00c - Fix clash of our ERROR log level with the ERROR macro defined in windows
- Fix definition of log levels so msvc accepts them
2018-05-16 23:03:03 -07:00
Sebastian Messmer
6a37f750f4 Fix c++ standard violation (msvc complains otherwise) 2018-05-16 22:56:50 -07:00
Sebastian Messmer
aeb4f8e852 Remove unnecessary file 2018-05-16 22:52:22 -07:00
Sebastian Messmer
ec9931e09e - Test showBacktraceOnSigsegv
- Test that failed assertions show a backtrace
2018-05-16 22:42:03 -07:00
Sebastian Messmer
3563f4687d Add testcases for backtrace 2018-05-16 22:31:43 -07:00
Sebastian Messmer
1126d7bd10 - Make get_total_memory work for windows
- Add test cases for it
2018-05-16 22:22:42 -07:00
Sebastian Messmer
61cad69671 - Fix nanoseconds in clock_gettime for Mac
- Hide clock_gettime in favor of cpputils::time::now()
- Add test cases to cpputils::time::now()
2018-05-16 22:18:45 -07:00
Sebastian Messmer
3ccb46c537 Make DontSwapMemoryRAII work on windows 2018-05-16 21:48:27 -07:00
Sebastian Messmer
2888ea6efd - Make homedir work on windows
- add test cases for homedir
2018-05-16 21:34:01 -07:00
Sebastian Messmer
c1bb081861 Remove unnecessary includes 2018-05-17 02:56:06 -07:00
Sebastian Messmer
efbe606961 Make backtrace work on windows 2018-05-16 19:47:51 -07:00
Sebastian Messmer
b97da2c735 Use XDG instead of /home/heinzi/.cryfs to store integrity data 2018-05-01 23:54:30 -07:00
Sebastian Messmer
f29e398e51 Rename --no-integrity-checks to --allow-integrity-violations 2018-04-29 13:41:21 -07:00
Sebastian Messmer
2b88a0d051 Fix typo 2018-04-21 22:38:24 -07:00
Sebastian Messmer
d7a41089ba Add environment variable to specify local storage directory 2018-04-21 22:04:21 -07:00
Sebastian Messmer
b0077e7a81 Don't error when trying to change owner/group of root dir, instead just ignore it 2018-04-18 00:24:41 -07:00
Sebastian Messmer
706ef263c9 Fix error logging 2018-04-15 21:37:06 -07:00
Sebastian Messmer
0f1345e64b Don't error when trying to change root dir timestamp, instead just ignore it 2018-04-04 21:21:21 -07:00
Sebastian Messmer
fc71242e25 Fix Travis CI build 2018-02-17 18:54:22 -08:00
Sebastian Messmer
8221e76f3a Fix migration for loading 0.9.x file systems 2018-02-03 21:33:07 -08:00
Sebastian Messmer
4de805ae41 Update filesystem format version 2018-02-03 10:12:26 -08:00
Sebastian Messmer
02976659d0 Merge from develop 2018-02-03 09:56:49 -08:00
Sebastian Messmer
a9556425dc Only migrate file system if storage format changed 2018-02-03 09:47:04 -08:00
Sebastian Messmer
652b505eef Add --allow-replaced-filesystem option to disable filesystem id checks 2018-02-03 08:33:59 -08:00
Sebastian Messmer
cab495f3ac Fix exit code for when the password is wrong 2018-02-02 06:35:49 -08:00
Sebastian Messmer
58fc26002b Exit codes for integrity errors 2018-02-01 18:09:28 -08:00
Sebastian Messmer
f90b7ad778 Merge from develop 2018-02-02 00:21:51 +00:00
Sebastian Messmer
5948f63fc8 When CryFS fails to load a file system, the process stops with a helpful error code, which can be used by GUI tools to show detailed messages. 2018-02-02 00:08:01 +00:00
Sebastian Messmer
5463c14872 Remove --version test case because it doesn't work 2018-02-01 11:24:55 -08:00
Sebastian Messmer
05f3726ec3 Merge from develop 2018-02-01 11:21:26 -08:00
Sebastian Messmer
5fc0b7cae8 Add --version option that shows the CryFS version and exits. 2018-02-01 10:21:47 -08:00
Sebastian Messmer
67afdd4baa Add test cases for --allow-filesystem-upgrade 2018-02-01 09:45:31 -08:00
Sebastian Messmer
8da4f4d362 Add --allow-filesystem-upgrade option which will upgrade old file systems without asking the user. This will be especially helpful for GUI tools. 2018-02-01 02:04:59 -08:00
Sebastian Messmer
7287f1ca4d Fix some tsan warnings 2018-01-15 01:58:48 +00:00
Sebastian Messmer
a0fa433f51 Merge from develop 2018-01-12 22:18:36 +00:00
Sebastian Messmer
f439bf9d0f Remove c style casts and unaligned memory accesses 2017-12-03 19:01:41 +00:00
Sebastian Messmer
d90e27eb11 Fix FakeAuthenticatedCipher test flakyness 2017-12-01 23:55:41 +00:00
Sebastian Messmer
cc7b38b3c1 - run-clang-tidy.sh also runs on test cases.
- fix clang-tidy warnings in test cases
2017-12-01 15:01:49 +00:00
Sebastian Messmer
006d8b541a Remove unused either class 2017-12-01 15:01:24 +00:00
Sebastian Messmer
e318b4879b Fix CI build 2017-11-05 16:36:11 +00:00
Sebastian Messmer
5fe3cada4c Enable some more clang-tidy checks and fix warnings 2017-10-29 16:35:10 +00:00
Sebastian Messmer
e38af1001d Remove unused using statements 2017-10-29 15:47:46 +00:00
Sebastian Messmer
5b0fa8c2f7 Workaround clang-tidy warning on newer clang-tidy versions 2017-10-27 15:29:38 +01:00
Sebastian Messmer
76e7f7da72 Introduce clang-tidy and fix corresponding warnings 2017-10-27 04:02:51 +01:00
Sebastian Messmer
27fba3252e std::malloc has implementation defined behavior for size=0. Handle this correctly. 2017-10-27 03:58:44 +01:00
Sebastian Messmer
8eac0f055f Fix clang-tidy warnings 2017-10-08 18:29:45 +01:00
Sebastian Messmer
8eda3bfcd5 Fix std::move misuse 2017-10-08 13:15:11 +01:00
Sebastian Messmer
180170e250 Fix memory leak reported by asan. Not a bad one since it only happens on program exit when the memory is freed anyhow, but better be clean ;) 2017-10-02 07:56:31 +01:00
Sebastian Messmer
d5075ec09e Fix 2017-10-02 04:14:19 +01:00
Sebastian Messmer
3787777967 Optimize std::move use 2017-10-01 09:04:29 +01:00
Sebastian Messmer
be8a1efd35 Improve test cases 2017-09-30 22:24:33 +01:00
Sebastian Messmer
85759961ef Don't keep update check connection open after update check is finished 2017-09-30 18:53:03 +01:00
Sebastian Messmer
011c6d26ce Don't pollute users local state dir when running test cases 2017-09-30 09:03:19 +01:00
Sebastian Messmer
7a5b23db13 Remember hashed filesystem key in local state so attacker can't replace it 2017-09-30 08:49:24 +01:00
Gerrit Toehgiono
a05e4733ef Fixes compilation on FreeBSD 11.1 (RELEASE branch) (#173)
* get_total_memory.cpp: include types.h before sysctl.h (fixes size_t unknown on FreeBSD

* Include fuse.h also in FreeBSD

* update 'defined'-style (src/spp/fuse/params.h)
2017-09-28 10:18:02 -07:00
Sebastian Messmer
49719e3e66 Use config file instead of dir for basedir metadata 2017-09-28 08:19:30 +01:00
Sebastian Messmer
aace4c2f13 Check that filesystem id didn't change since we loaded the basedir the last time 2017-09-28 07:41:08 +01:00
David Steele
18788bc3f8 Patch get_total_memory() for freebsd compatibility (#172) 2017-09-25 13:55:15 -07:00
Sebastian Messmer
26b3b366c9 Use local state file instead of myClientId file 2017-09-23 20:17:05 +01:00
Sebastian Messmer
73aab31ade Make LoopThread noncopyable 2017-09-19 20:16:47 +01:00
Sebastian Messmer
556d9cf452 New default block size: 16KB 2017-09-19 11:20:28 +01:00
Sebastian Messmer
9fdefaa4e0 Remove BlockStoreWithRandomKeys 2017-09-18 20:42:07 +01:00
Sebastian Messmer
a6592ae299 Fix clang build broken in last commit 2017-09-17 02:24:36 +01:00
Sebastian Messmer
5458af7c52 Rename blockstore::Key -> blockstore::BlockId 2017-09-17 02:07:27 +01:00
Sebastian Messmer
10e11f67e2 Make blockstore::Key more typesafe 2017-09-17 00:10:53 +01:00
Sebastian Messmer
f7c089ba47 Fix clang 5.0 compiler warnings 2017-09-16 17:45:15 +01:00
Sebastian Messmer
e4acf4e9a8 Merge from develop 2017-09-16 17:14:51 +01:00
Sebastian Messmer
5299be5dda Wire through the missingBlockIsIntegrityViolation setting 2017-09-16 16:49:33 +01:00
Sebastian Messmer
b6ce7c3ae4 Allow disabling integrity checks on command line 2017-09-16 16:18:53 +01:00
Sebastian Messmer
666d24e7b8 Fix no-compatibility mode 2017-09-16 00:52:23 +01:00
Sebastian Messmer
f6b6875bb2 Rename VersionCountingBlockStore -> IntegrityBlockStore 2017-09-16 00:18:58 +01:00
Sebastian Messmer
00d098952b Storing block ID is job of VersionCountingBlockStore, not EncryptedBlockStore. 2017-09-16 00:09:15 +01:00
Sebastian Messmer
82587ca185 Workaround bug in gcc 6/7 for building unit tests 2017-09-12 22:12:01 +01:00
Sebastian Messmer
0af7dea095 Fix tests on osx 2017-09-12 00:58:33 +01:00
Sebastian Messmer
0ec081750e Fix test cases 2017-09-11 14:37:06 +01:00
Sebastian Messmer
9516d4facc Further compatibility fixes for GCC 4.8 2017-09-10 14:27:14 +01:00
Sebastian Messmer
a584cddb86 Merge branch 'next' of github.com:cryfs/cryfs into next 2017-09-09 14:45:30 +01:00
Sebastian Messmer
fe1383b4ff Fix build 2017-09-09 14:44:01 +01:00
Sebastian Messmer
51e9ac39d2 GCC bug workaround 2017-09-09 14:40:34 +01:00
Christoph Gysin
d963424630 fix pessimizing move warnings (#170)
This fixes warnings emitted by clang:

src/cpp-utils/data/Data.cpp:37:10:
warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
        return std::move(result);
               ^
src/blockstore/implementations/ondisk/OnDiskBlockStore.cpp:61:17:
warning: moving a temporary object prevents copy elision [-Wpessimizing-move]
        auto result = std::move(OnDiskBlock::CreateOnDisk(_rootdir, key, std::move(data)));
                      ^
src/blobstore/implementations/onblocks/datatreestore/DataTree.cpp:249:10:
warning: moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
        return std::move(chain);
               ^

See also:
http://vmpstr.blogspot.ch/2015/12/redundant-stdmove.html
2017-09-06 17:26:27 +01:00
Mouse
977a381740 Fix compatibility with Crypto++ 6.0 (#169)
* Fix compatibility with Crypto++ 6.0 in a newly-introduced file EncryptedBlockStore2.h

* Convert fix to how it was done in "develop" branch
2017-09-05 21:51:24 +01:00
Sebastian Messmer
7e56c46bb0 CryFS tells the operating system to not swap the encryption key to the disk (note: this is best-effort and cannot be guaranteed. Hibernation, for example, will still write the encryption key to the disk) 2017-09-05 00:43:43 +01:00
Sebastian Messmer
3aa8b74fd9 Fix fsstat on osx 2017-08-31 23:40:25 +01:00
Sebastian Messmer
4da81fdbef Fix build on Mac OS X 2017-08-24 21:28:59 +01:00
Sebastian Messmer
fc21b0882a Fix relatime performance 2017-08-24 08:19:16 +01:00
Sebastian Messmer
5fb4098c8b Implement relatime behavior for performance 2017-08-23 20:32:36 +01:00
Sebastian Messmer
679b14a4d8 * Allow mounting using system mount tool and /etc/fstab (e.g. mount -t fuse.cryfs basedir mountdir)
* Pass fuse options directly to cryfs (i.e. 'cryfs basedir mountdir -o allow_other' instead of 'cryfs basedir mountdir -- -o allow_other')
2017-08-23 09:56:03 +01:00
Sebastian Messmer
ffc0b5195c - Fix CachingBlockStore2_Specific test cases to actually test CachingBlockStore2
- Remove old CachingBlockStore
2017-08-22 00:03:04 +01:00
Sebastian Messmer
30cec27bd8 Improve remove handling in cache 2017-08-21 23:43:11 +01:00
Sebastian Messmer
9d298bad6c Switch to new caching block store 2017-08-21 23:11:45 +01:00
Sebastian Messmer
509bf6cc26 Fix CachingBlockStore2 and add test case for it 2017-08-21 23:09:43 +01:00
Sebastian Messmer
4add7f3d80 Start implementing new cache 2017-08-21 22:44:35 +01:00
Sebastian Messmer
a45c0bf29a Fix merge conflict 2017-08-20 01:12:28 +01:00
Sebastian Messmer
ff34049787 Merge branch 'next' into newblockstore 2017-08-19 11:54:01 +01:00
Sebastian Messmer
ade23f9b86 Merge branch 'develop' into next 2017-08-19 11:53:22 +01:00
Mouse
7abed14d63 Make compatible with the current Crypto++ master (#163)
* Make compatible with the current Crypto++ master

* Add auto-config and build script. Not important, just a time-saver.

* Address compatibility with Crypto++ 6.0 release, while maintaining compatibility
with the older Crypto++ releases.

* Polish comments in cryptopp_byte.h. Forgot to include it to RandomGeneratorThread - fixed.

* Late at night - forgot to fix the .cpp files that used ::byte...

* Renamed auto-config-and-run script

* Added comments/description, and commented out "make check" that fails anyway

* Changed the include guard to match the rest of the .h files

* Delete build script

* Update ChangeLog.txt

* Update ChangeLog.txt
2017-08-16 03:00:46 +01:00
Sebastian Messmer
4a602ce7a5 Remove old blockstore implementations 2017-07-20 19:32:42 -07:00
Sebastian Messmer
36c29f19cf Fix LowToHighLevelBlock 2017-07-18 16:59:48 -07:00
Sebastian Messmer
acf01ec4ff Actually wire up CryDevice to use new block stores 2017-07-18 14:49:51 -07:00
Sebastian Messmer
872c94865c Use using for shorter code 2017-07-13 02:13:13 -05:00
Sebastian Messmer
534968484c Use using for shorter code 2017-07-13 01:33:35 -05:00
Sebastian Messmer
fbcab0abcc Move stuff to .cpp files 2017-07-13 01:07:07 -05:00
Sebastian Messmer
428290fda5 Extend BlockStore2 and write a LowToHighLevelBlockStore as wrapper from BlockStore to BlockStore2 2017-07-07 16:18:09 -05:00
Sebastian Messmer
0942275d8c TODOs 2017-07-07 18:09:29 +02:00
Sebastian Messmer
d6c27e92c5 Add VersionCountingBlockStore2 to build 2017-07-07 17:35:38 +02:00
Sebastian Messmer
6bdefc56a4 Simplify VersionCountingBlockStore::store() 2017-07-07 17:21:52 +02:00
Sebastian Messmer
f22a9b2f0a Merge branch 'next' into newblockstore 2017-07-07 15:48:24 +02:00
Sebastian Messmer
ec3bec07ff Assert that unique_ref is always defined and not nullptr 2017-04-10 15:14:02 -07:00
Sebastian Messmer
317088e449 Rename unique_ref::isValid to is_valid to comply with naming scheme of other functions 2017-04-10 14:16:30 -07:00
Sebastian Messmer
d8efcbb144 Merge branch 'develop' into next 2017-04-06 01:02:13 +01:00
Sebastian Messmer
3d56b97052 Make unique_ref constructor explicit 2017-04-05 21:02:03 +01:00
Sebastian Messmer
636ed437aa Improve unique_ref tests 2017-04-05 20:48:00 +01:00
Sebastian Messmer
ed9f224f19 Further unique_ref improvements 2017-04-03 19:08:41 +01:00
Sebastian Messmer
2fb61e7c71 Further improve unique_ref 2017-04-03 15:43:27 +01:00
Sebastian Messmer
9ada10db4d Improve unique_ref 2017-04-03 14:43:32 +01:00
Sebastian Messmer
590cd92de5 Install man page 2017-03-26 14:08:47 +01:00
Sebastian Messmer
dbf54b9563 Add test cases for BlockStore2 and fix existing BlockStore2 implementations 2017-02-21 22:27:46 +00:00
Sebastian Messmer
d84e65ad76 Merge from develop 2017-02-18 13:22:43 +00:00
Sebastian Messmer
19bfe97d52 du reports correct space usage 2017-02-18 13:21:54 +00:00
Sebastian Messmer
70bfc47a2f Start implementing new blockstore 2017-02-14 08:16:38 +00:00
Sebastian Messmer
1ec5df98d6 Compile cryfs-stats executable 2017-02-14 08:15:11 +00:00
Sebastian Messmer
5350a14a4a Add stats tool to build 2017-02-11 13:28:34 +00:00
Sebastian Messmer
cab1c71cac Merge from develop 2017-02-04 19:18:00 +00:00
Sebastian Messmer
59afd50c28 Fix clang build 2017-02-04 19:17:17 +00:00
Sebastian Messmer
54e0ffce2e Merge branch 'develop' of github.com:cryfs/cryfs into develop 2017-02-04 19:03:32 +00:00
Sebastian Messmer
9a304fc52b Upgrade spdlog to 0.11.0 2017-02-04 19:03:20 +00:00
Sebastian Messmer
596d9d0426 Merge from develop 2017-02-04 14:38:14 +00:00
Sebastian Messmer
7267bb5be4 Fix buid on Mac OS X 2017-02-04 14:21:00 +00:00
Nicolas Schneider
ffc2fe8eef print defaults for cipher and blocksize in cli help (#124)
Closes #94.
2017-01-23 00:23:51 +00:00
Sebastian Messmer
92776fe507 Merge branch 'develop' into next 2017-01-22 21:24:46 +00:00
Sebastian Meßmer
013be34150 Remove unneeded method 2017-01-22 19:46:47 +00:00
Sebastian Messmer
af24fa5402 Merge branch 'develop' into next 2017-01-22 01:11:36 +00:00
Sebastian Messmer
bbdfc5c234 Simplify FsppNodeTest 2017-01-22 01:11:26 +00:00