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
044cb58588
Add loop-AES compatible handling code.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@418 36d66b0a-2a48-0410-832c-cd162a569da5
2011-01-25 18:48:56 +00:00
Milan Broz
49937ac591
Detect # of keys from cipher string.
...
Fix status output string.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@417 36d66b0a-2a48-0410-832c-cd162a569da5
2011-01-25 18:48:48 +00:00
Milan Broz
4b0e7ae41d
Fix previous commit (for now).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@400 36d66b0a-2a48-0410-832c-cd162a569da5
2010-12-09 18:25:31 +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
b13b4b7654
Remove uneeded function prototype.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@374 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-15 17:03:43 +00:00
Milan Broz
a70b27762d
Fix some warnings if compiled with clang.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@371 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-15 16:19:19 +00:00
Milan Broz
37ae78c9d8
Fix cryptsetup binary exitcodes.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@368 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-14 22:00:51 +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
f90edb6133
Simplify return codes from get key functions.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@363 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-13 16:41:29 +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
7b42e0b99c
No longer support luksDelKey, reload and --non-exclusive.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@359 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-05 11:27:36 +00:00
Milan Broz
988b1f95fd
Use new API for luksUUID, luksDump.
...
Use default log callback.
Check for keyslot #
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@358 36d66b0a-2a48-0410-832c-cd162a569da5
2010-11-05 11:27:27 +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
2fbf5994f4
* Add --keyfile-size and --new-keyfile-size (in bytes) size and
...
disallow overloading of --key-size for limiting keyfile reads.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@356 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-29 15:47:52 +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
dfe77be748
* Implement --use-random and --use-urandom for luksFormat to allow setting of RNG for volume key generator.
...
* Add crypt_set_rng_type() and crypt_get_rng_type() to API.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@354 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-27 15:35:23 +00:00
Milan Broz
c3f3865485
Rewrite luksFormat, luksOpen, liksAddKey in crypsetup for new API.
...
With new API is possible to add ne features (old API calls are frozen
and deprecated).
FIXME: add more regression tests here.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@353 36d66b0a-2a48-0410-832c-cd162a569da5
2010-10-27 10:55:11 +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
7e715a94bb
Print empty line in status if underlying device disappeared.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@243 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-30 17:38:11 +00:00
Milan Broz
b4ebe0be18
Add verbose log level and move unlocking keyslot messages there.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@238 36d66b0a-2a48-0410-832c-cd162a569da5
2010-05-27 18:44:14 +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
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
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
6c3a4cf331
Remove nonfuctional default values from help (and reformat table).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@179 36d66b0a-2a48-0410-832c-cd162a569da5
2010-01-15 14:27:32 +00:00
Milan Broz
4d6dd0df96
Move default cipher paramaters to config.h and allow change through
...
configuration script.
Change default LUKS keysize to 256.
Change default PLAIN mode to cbc-essiv:sha256.
Note that you have to specify cipher and mode in plain type,
otherwise there is backward incompatibility.
If you really need the same compatible paramaters, you can compile
cryptsetup using old defaults, e.g:
./configure --with-plain-mode=cbc-plain --with-luks1-keybits=128
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@151 36d66b0a-2a48-0410-832c-cd162a569da5
2009-12-01 14:31:08 +00:00
Milan Broz
1c58538b6d
Fix typos (Thanks to Solveig).
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@148 36d66b0a-2a48-0410-832c-cd162a569da5
2009-11-28 14:43:07 +00:00
Milan Broz
6c900eea72
Add obsolete message for non-exclusive switch.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@144 36d66b0a-2a48-0410-832c-cd162a569da5
2009-11-16 19:05:40 +00:00
Milan Broz
3e037b7422
Move duplicated failed message to verbose level, add some debug messages, fix resize call.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@126 36d66b0a-2a48-0410-832c-cd162a569da5
2009-10-01 14:11:55 +00:00
Milan Broz
de95a38381
Move dm backend initialisation to library calls.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@125 36d66b0a-2a48-0410-832c-cd162a569da5
2009-10-01 10:14:32 +00:00
Milan Broz
8bec41ab34
Properly apply versioned symbols in library and fix problems uncovered
...
by doing that:-)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@124 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-30 15:07:41 +00:00
Milan Broz
3a3d3e89e5
Fix typo in backup file option. (Thanks to Jonas Meurer)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@118 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-29 11:08:29 +00:00
Milan Broz
e026f089be
Add luksHeaderBackup and luksHeaderRestore commands and API cals.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@114 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-28 17:45:38 +00:00
Milan Broz
1e7d8afc99
Fix typo in help text.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@110 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-11 10:17:54 +00:00
Milan Broz
dfadce6d80
Try to read first sector from device to properly check that device is ready.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@106 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-08 10:29:50 +00:00
Milan Broz
a47856ac49
Use dm-uuid for all crypt devices, contains device type and name now.
...
DM_UUID now contains prefix (CRYPT-), device type (LUKS1, PLAIN, TEMP),
UUID (if provided - LUKS) and device name.
Because e.g. snapshot of full LUKS device during activation must have different
name, DM-UUID is different too and we do not need --disable-uuid option.
DM-UUID is persistent during activation time.
* Revert (and solve different way): Replace not safe option --non-exclusive with --disable-uuid.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@105 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-08 06:41:44 +00:00
Milan Broz
3cea5dcc7b
* Add luksSuspend (freeze device and wipe key) and luksResume (with provided passphrase).
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@104 36d66b0a-2a48-0410-832c-cd162a569da5
2009-09-02 12:47:21 +00:00
Milan Broz
771db939ad
* Replace not safe option --non-exclusive with --disable-uuid.
...
(just formal change, code already contains the change)
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@101 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-31 17:03:10 +00:00
Milan Broz
c878e56237
* Add --master-key-file option for luksFormat and luksAddKey.
...
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@99 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:10:23 +00:00
Milan Broz
bf7819ccef
* Add log macros and make logging modre consitent.
...
* Move command successful messages to verbose level.
* Introduce --debug parameter.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@92 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:07:17 +00:00
Milan Broz
4e471a9b03
* Move memory locking and dm initialization to command layer.
...
* Increase priority of process if memory is locked.
Signed-off-by: Milan Broz <mbroz@redhat.com >
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@91 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-30 18:07:00 +00:00
Milan Broz
d980dbb300
Allow restrict keys size in LuksOpen (thanks to Stefan Assmann)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@86 36d66b0a-2a48-0410-832c-cd162a569da5
2009-08-17 11:04:36 +00:00
Milan Broz
a0b795becb
Enable LUKS hash setting and document it.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@83 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 15:02:53 +00:00
Milan Broz
ed9e146cb6
Add required parameters for changing hash used in LUKS key setup scheme.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@80 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:57:52 +00:00
Milan Broz
4a257d8c65
Print error when getline() fails (thanks to Ivan Stankovic)
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@76 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-30 14:46:56 +00:00
Milan Broz
0bc3ffae8b
Reject unsupported --offset and --skip options for luksFormat and update man page.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@63 36d66b0a-2a48-0410-832c-cd162a569da5
2009-07-11 07:09:05 +00:00
Clemens Fruhwirth
c3d5f498b8
Cleanups thanks to Ivan Stankovic
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@46 36d66b0a-2a48-0410-832c-cd162a569da5
2009-01-13 20:09:17 +00:00
Clemens Fruhwirth
7fbbc21a07
Add non-exclusive override via --non-exclusive.
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@25 36d66b0a-2a48-0410-832c-cd162a569da5
2008-06-30 12:20:24 +00:00
Clemens Fruhwirth
7dc7b90a9b
Initial checking of what was revision 56 on http://luks.endorphin.org/svn/cryptsetup
...
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@3 36d66b0a-2a48-0410-832c-cd162a569da5
2008-03-22 08:23:35 +00:00