Commit a1306ed0 authored by Milan Broz's avatar Milan Broz

Remove old API functions (all functions using crypt_options).

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@561 36d66b0a-2a48-0410-832c-cd162a569da5
parent 790ef043
2011-07-07 Milan Broz <mbroz@redhat.com>
* Remove old API functions (all functions using crypt_options).
2011-07-01 Milan Broz <mbroz@redhat.com>
* Add --shared option for creating non-overlapping crypt segments.
* Add shared flag to libcryptsetup api.
......
AC_PREREQ([2.67])
AC_INIT([cryptsetup],[1.3.2-cvs])
AC_INIT([cryptsetup],[1.4.0-cvs])
dnl library version from <major>.<minor>.<release>[-<suffix>]
LIBCRYPTSETUP_VERSION=$(echo $PACKAGE_VERSION | cut -f1 -d-)
LIBCRYPTSETUP_VERSION_INFO=3:0:2
LIBCRYPTSETUP_VERSION_INFO=4:0:0
AC_CONFIG_SRCDIR(src/cryptsetup.c)
AC_CONFIG_MACRO_DIR([m4])
......
......@@ -613,67 +613,6 @@ const char *crypt_get_dir(void);
#define CRYPT_DEBUG_NONE 0
void crypt_set_debug_level(int level);
/**
* OLD DEPRECATED API **********************************
*
* Provided only for backward compatibility.
*/
struct interface_callbacks {
int (*yesDialog)(char *msg);
void (*log)(int level, char *msg);
};
#define CRYPT_FLAG_VERIFY (1 << 0)
#define CRYPT_FLAG_READONLY (1 << 1)
#define CRYPT_FLAG_VERIFY_IF_POSSIBLE (1 << 2)
#define CRYPT_FLAG_VERIFY_ON_DELKEY (1 << 3)
#define CRYPT_FLAG_NON_EXCLUSIVE_ACCESS (1 << 4)
struct crypt_options {
const char *name;
const char *device;
const char *cipher;
const char *hash;
const char *passphrase;
int passphrase_fd;
const char *key_file;
const char *new_key_file;
int key_size;
unsigned int flags;
int key_slot;
uint64_t size;
uint64_t offset;
uint64_t skip;
uint64_t iteration_time;
uint64_t timeout;
uint64_t align_payload;
int tries;
struct interface_callbacks *icb;
};
int crypt_create_device(struct crypt_options *options);
int crypt_update_device(struct crypt_options *options);
int crypt_resize_device(struct crypt_options *options);
int crypt_query_device(struct crypt_options *options);
int crypt_remove_device(struct crypt_options *options);
int crypt_luksFormat(struct crypt_options *options);
int crypt_luksOpen(struct crypt_options *options);
int crypt_luksKillSlot(struct crypt_options *options);
int crypt_luksRemoveKey(struct crypt_options *options);
int crypt_luksAddKey(struct crypt_options *options);
int crypt_luksUUID(struct crypt_options *options);
int crypt_isLuks(struct crypt_options *options);
int crypt_luksDump(struct crypt_options *options);
void crypt_put_options(struct crypt_options *options);
#ifdef __cplusplus
}
#endif
......
......@@ -54,22 +54,6 @@ CRYPTSETUP_1.0 {
crypt_header_backup;
crypt_header_restore;
crypt_create_device;
crypt_update_device;
crypt_resize_device;
crypt_query_device;
crypt_remove_device;
crypt_luksFormat;
crypt_luksOpen;
crypt_luksKillSlot;
crypt_luksRemoveKey;
crypt_luksAddKey;
crypt_luksUUID;
crypt_isLuks;
crypt_luksDump;
crypt_put_options;
local:
*;
};
This diff is collapsed.
......@@ -153,11 +153,6 @@ static int crypt_decode_key(char *key, char *hex, unsigned int size)
return 0;
}
static int yesDialog(char *msg)
{
return 1;
}
static void cmdLineLog(int level, char *msg)
{
strncat(global_log, msg, sizeof(global_log) - strlen(global_log));
......@@ -169,7 +164,6 @@ static void new_log(int level, const char *msg, void *usrptr)
cmdLineLog(level, (char*)msg);
}
static void reset_log()
{
memset(global_log, 0, sizeof(global_log));
......@@ -182,11 +176,6 @@ static void _system(const char *command, int warn)
printf("System command failed: %s", command);
}
static struct interface_callbacks cmd_icb = {
.yesDialog = yesDialog,
.log = cmdLineLog,
};
static void _cleanup(void)
{
struct stat st;
......@@ -300,6 +289,17 @@ void xlog(const char *msg, const char *tst, const char *func, int line, const ch
#define RUN_(x, y) do { printf("%s: %s\n", #x, (y)); x(); } while (0)
#if 0
static int yesDialog(char *msg)
{
return 1;
}
static struct interface_callbacks cmd_icb = {
.yesDialog = yesDialog,
.log = cmdLineLog,
};
// OLD API TESTS
static void LuksUUID(void)
{
......@@ -589,6 +589,7 @@ void DeviceResizeGame(void)
_remove_keyfiles();
}
#endif
// NEW API tests
......@@ -1097,7 +1098,7 @@ int main (int argc, char *argv[])
crypt_set_debug_level(_debug ? CRYPT_DEBUG_ALL : CRYPT_DEBUG_NONE);
RUN_(NonFIPSAlg, "Crypto is properly initialised in format"); //must be the first!
#if 0
RUN_(LuksUUID, "luksUUID API call");
RUN_(IsLuks, "isLuks API call");
RUN_(LuksOpen, "luksOpen API call");
......@@ -1106,7 +1107,7 @@ int main (int argc, char *argv[])
RUN_(LuksFormat, "luksFormat API call");
RUN_(LuksKeyGame, "luksAddKey, RemoveKey, KillSlot API calls");
RUN_(DeviceResizeGame, "regular crypto, resize calls");
#endif
RUN_(AddDevicePlain, "plain device API creation exercise");
RUN_(HashDevicePlain, "plain device API hash test");
RUN_(AddDeviceLuks, "Format and use LUKS device");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment