Commit Graph

43 Commits

Author SHA1 Message Date
Milan Broz
fdcabdfd28 Support test run in kernel FIPS mode. 2013-01-15 14:53:19 +01:00
Milan Broz
df8fb84723 Workaround api-test compilation on some very old systems. 2013-01-08 17:41:06 +01:00
Milan Broz
29f21208a0 Change License from GPLv2 only to GPLv2+ ("or any later").
Agreed by all copyright authors.
2012-12-29 11:33:54 +01:00
Milan Broz
83f02e6682 Add copyright line for files I have written or modified. 2012-12-21 16:40:33 +01:00
Milan Broz
069ba220d2 Add crypt_keyslot_change_by_passphrase() api test. 2012-12-21 16:27:55 +01:00
Milan Broz
d05f020d5a Add keyfiles tcrypt test. 2012-12-01 13:43:59 +01:00
Milan Broz
dde57477fc And skip tcrypt api test if there is no af_alf kernel interface. 2012-11-30 18:53:32 +01:00
Milan Broz
ffb6ecc488 Add TCRYPT api test, fix some minor problems found. 2012-11-30 18:41:10 +01:00
Milan Broz
15442c1747 Modprobe kernel modules early in api-test. 2012-08-14 15:54:31 +02:00
Milan Broz
a47ebccf9a Add module load to test. 2012-07-10 10:15:40 +02:00
Milan Broz
5f7309bfa0 Add some verity api test.
Fix set_data_device bug it uncovered.
Fix api-test for nonFIPS hash.
2012-07-09 18:09:51 +02:00
Milan Broz
5c7954a0c7 Require only up to last keyslot area for header device (ignore data offset).
Fix header backup and restore to work on files with large data offset.
2012-06-11 12:20:19 +02:00
Milan Broz
ee8425b836 Version 1.4.2.
Add header and copyright for header files.
2012-04-02 22:03:05 +02:00
Milan Broz
9511c91a79 Add --keyfile-offset and --new-keyfile-offset to cryptsetup.
Add resume_by_keyfile_offset, add_kesylot_by_keyfile_offset and
activate_by_keyfile_offset to API.

Thanks to Matthew Monaco <matthew.monaco@0x01b.net>
2012-03-29 18:35:07 +02:00
Milan Broz
7835b365a7 Fix FSF address in license text according to
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@671 36d66b0a-2a48-0410-832c-cd162a569da5
2011-11-02 22:35:21 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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