Commit Graph

189 Commits

Author SHA1 Message Date
Milan Broz
6e119ab6cc Fix crypt_get_volume_key_size() for plain device.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@665 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-27 20:40:16 +00:00
Milan Broz
f5d777e412 Silent some extra gcc warnings in tests.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@654 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-26 13:19:37 +00:00
Milan Broz
02e36d7606 Removes obsolete valgrind suppression (Thanks to okozina)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@644 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-15 20:27:58 +00:00
Milan Broz
d6016b1c2d Revert get_last_error change for test-api (crypt_init should test for error message).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@635 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-09 22:10:43 +00:00
Milan Broz
cc3b39980b Fix luksKillSLot exit code if slot is inactive or invalid. (Issue 108)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@624 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-09 13:46:03 +00:00
Milan Broz
8c54d938ac Add crypt_last_error() API call (using crypt context).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@623 36d66b0a-2a48-0410-832c-cd162a569da5
2011-10-09 13:45:53 +00:00
Milan Broz
1a8bae8884 Add keyslot option for luksOpen (thanks to okozina).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@611 36d66b0a-2a48-0410-832c-cd162a569da5
2011-09-22 20:26:37 +00:00
Milan Broz
538169fb5b Fix some memory leaks (thanks to okozina).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@610 36d66b0a-2a48-0410-832c-cd162a569da5
2011-09-21 22:42:18 +00:00
Milan Broz
963ee0e6ee Add some valgrind checks (thanks to okozina).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@609 36d66b0a-2a48-0410-832c-cd162a569da5
2011-09-21 22:42:03 +00:00
Milan Broz
d20e2ff02d Do not allow format of already formatted context.
(Thanks to okozina@redhat.com)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@608 36d66b0a-2a48-0410-832c-cd162a569da5
2011-08-26 19:46:29 +00:00
Milan Broz
d5e48fcb00 Enhance check of device size before writing LUKS header.
(Thanks to okozina@redhat.com)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@607 36d66b0a-2a48-0410-832c-cd162a569da5
2011-08-26 19:46:17 +00:00
Milan Broz
95009fff4b Add some API test and rewrite some parts.
(Thanks to okozina@redhat.com)

[not yet finished]

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@603 36d66b0a-2a48-0410-832c-cd162a569da5
2011-08-22 21:54:11 +00:00
Milan Broz
7fe10e3d7b Add API tests for plain device.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@591 36d66b0a-2a48-0410-832c-cd162a569da5
2011-08-02 12:16:00 +00:00
Milan Broz
c30fe505c5 Add check of decrypted image to test.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@581 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-25 21:49:14 +00:00
Milan Broz
e5244bc47c Fix new tests to use sha1 (ripemd160 not supported in some backends).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@579 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-25 15:24:16 +00:00
Milan Broz
1bf26b9a90 * Revert default initialisation of volume key in crypt_init_by_name().
* Do not allow key retrieval while suspended (key could be wiped).
* Do not allow suspend for non-LUKS devices.
* Support retries and timeout parameters for luksSuspend.

Add luksSuspend/Resume test.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@574 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-19 13:55:34 +00:00
Milan Broz
9c71c74d59 Add --enable-discards option to allow discards/TRIM requests.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@572 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-17 22:35:40 +00:00
Milan Broz
a1306ed01c Remove old API functions (all functions using crypt_options).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@561 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-07 14:32:42 +00:00
Milan Broz
d44d07c9eb * Add --shared option for creating non-overlapping crypt segments.
* Add shared flag to libcryptsetup api.
* Fix plain crypt format parameters to include size option (API change).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@559 36d66b0a-2a48-0410-832c-cd162a569da5
2011-07-01 16:38:58 +00:00
Milan Broz
96d67485d9 Seems that dmsetup table is broken in recent lvm2, let's support "x: table" as well.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@551 36d66b0a-2a48-0410-832c-cd162a569da5
2011-06-13 16:45:09 +00:00
Milan Broz
a5757c35f0 Fix return code for status command when device doesn't exists.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@550 36d66b0a-2a48-0410-832c-cd162a569da5
2011-06-13 16:44:42 +00:00
Milan Broz
9e9bf5ca56 Fix previous fix - keep API logic clean, fix cryptsetup call.
Add more API regression tests.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@525 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-18 15:05:46 +00:00
Milan Broz
b53b577b19 Fix keyfile=- processing in create command (1.3.0, issue 104)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@524 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-17 15:34:40 +00:00
Milan Broz
afd526a8c4 Fix size argument for create command. (regression in 1.2.0)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@518 36d66b0a-2a48-0410-832c-cd162a569da5
2011-05-03 13:13:16 +00:00
Milan Broz
8256b673a1 Fix offset parameter.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@482 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-22 21:11:28 +00:00
Milan Broz
2072adf705 Also support --skip option for loopaesOpen.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@481 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-22 20:51:50 +00:00
Milan Broz
bce295738b Fix offset option for loopaesOpen.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@476 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-21 17:48:30 +00:00
Milan Broz
93da52f883 Rewrite key input handling, add limits.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@474 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-19 00:17:10 +00:00
Milan Broz
4505d0a36b Add defaults to --help output.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@460 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-14 13:41:00 +00:00
Milan Broz
9ba3bb3a5e Fix loopaes open parameters.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@458 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-14 00:07:39 +00:00
Milan Broz
25512d89ae Clean up plain password hashing, do not ignore error in crypto backend.
(New backend can fail there).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@451 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-13 23:50:49 +00:00
Milan Broz
e1cc40df7e Add luksChangeKey command.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@450 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-13 18:06:15 +00:00
Milan Broz
b7498adc1c Remove not needed header.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@449 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-13 18:06:07 +00:00
Milan Broz
01e03f7002 Use loop functions even in api test.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@448 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-12 22:29:14 +00:00
Milan Broz
005855ce90 Allow tests to work with different default cipher/mode.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@441 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 22:12:03 +00:00
Milan Broz
6083652089 Avoid using "-" in tests, some old systems has bug in getopt.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@440 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 21:16:51 +00:00
Milan Broz
2124cbf5ee Fix error output redirection in tests.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@439 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 21:01:49 +00:00
Milan Broz
eb29f40384 Allocate free loop devices instead of using hardcoded.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@438 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 20:18:40 +00:00
Milan Broz
4f3a65a629 Add simple Loop-AES compatibility check.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@437 36d66b0a-2a48-0410-832c-cd162a569da5
2011-03-10 17:16:03 +00:00
Milan Broz
e0dab9e99f Fix luksAddKey return code if master key is used.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@421 36d66b0a-2a48-0410-832c-cd162a569da5
2011-01-31 23:10:32 +00:00
Milan Broz
0a905364fa Fix mapping removal if device disappeared but node still exists.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@420 36d66b0a-2a48-0410-832c-cd162a569da5
2011-01-29 15:55:27 +00:00
Milan Broz
e2fbcea56a Fix tests to work with all crypto backends.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@409 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-31 14:33:53 +00:00
Milan Broz
ca73541753 Add settle to test scripts (needed only for old systems).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@403 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-19 23:46:10 +00:00
Milan Broz
e8e805dfd3 Add simple checksum test.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@402 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-19 21:17:36 +00:00
Milan Broz
058976ff08 Add password hash test for create command.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@401 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-10 15:36:41 +00:00
Milan Broz
68c2ac1087 Fix create command to properly handle keyfile size.
- for keyfile reset hash, it make no sense (see man page)
- use activate_by_keyfile to make code more readable
(it still does the stem thing)

- if keyfile specified, read only key and do not do exhausted
read (regression from 1.1.3)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@399 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-09 17:58:50 +00:00
Milan Broz
38c694a143 Fix crypt_activate_by_keyfile() to work with PLAIN devices.
(allows systemd swap with /dev/urandom activation)

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@385 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-25 14:56:46 +00:00
Milan Broz
c066fddf8b Static build is not default... fix test.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@376 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-15 21:09:53 +00:00
Milan Broz
230ac16201 Fix clang warning is tests.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@375 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-15 18:12:29 +00:00
Milan Broz
312d8eca73 * Allow to activate by internally cached volume key
(format/activate without keyslots active - used for temporary devices).
* Initialize volume key from active device in crypt_init_by_name()

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@365 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-14 17:22:04 +00:00