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
Milan Broz
b861d1e7f4
Add --dump-master-key option for luksDump to allow volume key dump.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@364 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-14 10:43:28 +00:00
Milan Broz
6258753b1a
* Fix password callback call.
...
* Fix default plain password entry from terminal in activate_by_passphrase.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@362 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-13 16:41:20 +00:00
Milan Broz
b7caa72acd
* Disallow mapping of device which is already in use (mapped or mounted).
...
* Disallow luksFormat on device in use.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@361 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-05 17:53:33 +00:00
Milan Broz
c9881f8c33
* Add crypt_get_type(), crypt_resize(), crypt_keyslot_max()
...
and crypt_get_active_device() to API.
* Rewrite all implementations in cryptsetup to new API.
* Fix luksRemoveKey to behave as documented (do not ask
for remaining keyslot passphrase).
* Add more regression tests for commands.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@360 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-05 11:27:47 +00:00
Milan Broz
791481b9e9
Fix luksFormat to properly use key file with --master-key-file switch.
...
Fix possible double free when handling master key file.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@357 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-29 20:04:01 +00:00
Milan Broz
a38cb2375f
* Add crypt_set_uuid() to API.
...
* Allow UUID setting in luksFormat and luksUUID (--uuid parameter).
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@355 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-29 13:54:14 +00:00
Milan Broz
6fde2f640b
Fix po files include and tests.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@350 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-26 14:35:16 +00:00
Milan Broz
bb8e085378
Add utils_crypt file and test for supported modes presentation.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@348 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-26 14:34:47 +00:00
Milan Broz
9679fb7f25
Add crypt_get_device_name() to API (get underlying device name).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@342 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-18 14:47:06 +00:00
Milan Broz
16ad14d2c6
Check if requested hash is supported before writing LUKS header.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@331 36d66b0a-2a48-0410-832c-cd162a569da5
2010-08-13 15:03:07 +00:00
Milan Broz
b117dcc209
Do not query non-existent device twice:
...
# cryptsetup status /dev/nonexistent
Device /dev/nonexistent not found
Device /dev/nonexistent not found
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@330 36d66b0a-2a48-0410-832c-cd162a569da5
2010-08-13 14:05:34 +00:00
Milan Broz
ef44e6e3d3
Use default data alignment to 1MiB.
...
If there is topology info, use default if topology is multiple of default,
otherwise use topology values.
See https://bugzilla.redhat.com/show_bug.cgi?id=621684 and issue 55.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@325 36d66b0a-2a48-0410-832c-cd162a569da5
2010-08-09 16:34:42 +00:00
Milan Broz
cf4fec3865
Rewrite filediffer to C and make it work properly.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@322 36d66b0a-2a48-0410-832c-cd162a569da5
2010-08-05 16:41:28 +00:00
Milan Broz
1e03a34ccb
Fix activate_by_* API calls to handle NULL device name as documented.
...
And add some tests for this.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@262 36d66b0a-2a48-0410-832c-cd162a569da5
2010-06-03 15:18:14 +00:00
Milan Broz
6ec29d935f
Fix (deprecated) reload device command to accept new device argument.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@241 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-30 12:23:38 +00:00
Milan Broz
231ab0167b
Fix luksFormat/luksOpen reading passphrase from stdin and "-" keyfile.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@237 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-27 18:44:00 +00:00
Milan Broz
cddf4d859d
Fix luksClose if underlying device is another DM device
...
and commands fails with "Device 253:0 doesn't exist or access denied." error.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@225 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-23 13:09:33 +00:00
Milan Broz
4ac7e5a4d2
Skip align test if kernel fails to load scsi_debug.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@215 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-01 16:04:04 +00:00
Milan Broz
f47b7ba425
Fix gcrypt detection & compatimage in api-test.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@212 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-01 09:59:12 +00:00
Milan Broz
5107296213
Rename apitest -> api-test.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@211 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-01 09:59:04 +00:00
Milan Broz
19dc09131d
Rename align test (Anyone mentioned autoconfigure?). Add some minor changes, run it in make check.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@210 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-01 09:58:55 +00:00
Milan Broz
78d014e27d
Move compat test to separate script and run it in make check.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@209 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-01 09:58:47 +00:00
Milan Broz
611278ca39
Allow no hash specification in plain device constructor (issue 63).
...
Fix some warnings in apitest.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@207 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-30 14:05:25 +00:00
Milan Broz
1dcd5a3de5
Detect old dm-crypt module and disable LUKS suspend/resume.
...
Fix apitest to work on older systems.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@205 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-30 12:03:41 +00:00
Milan Broz
0516a1a676
Do not use kernel dm-ioctl header directly and remove warnings.
...
Add alignment test to distributed files.
Fix write() return compiler warning.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@202 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-16 15:48:09 +00:00
Milan Broz
17c87c1148
Fix minor errors
...
- undefined variable
- properly closinf file descriptorif totpology not detected
- fix IV mode to test run on RHEL5
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@201 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-16 14:51:09 +00:00
Milan Broz
566f48f7a4
Fix align test.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@200 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-16 13:16:11 +00:00
Milan Broz
d39b33a371
Avoid class C++ keyword in library header.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@197 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-12 11:53:47 +00:00
Milan Broz
743fbbc451
Support topology information for data alignment (LUKS).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@195 36d66b0a-2a48-0410-832c-cd162a569da5
2010-04-09 15:35:19 +00:00
Milan Broz
311727a571
Add nonFIPS alg format test, clean up some warnings in apicheck.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@172 36d66b0a-2a48-0410-832c-cd162a569da5
2010-01-10 20:40:50 +00:00
Milan Broz
403559261a
Fix test to handle new default key size.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@153 36d66b0a-2a48-0410-832c-cd162a569da5
2009-12-11 11:56:17 +00:00