Fix some minor compilation problems in crypto backends.

git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@463 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
Milan Broz
2011-03-14 16:44:56 +00:00
parent 85e71a8680
commit 143603c471
4 changed files with 6 additions and 3 deletions

View File

@@ -20,7 +20,7 @@
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <nss.h> #include <nss.h>
#include <nss/pk11pub.h> #include <pk11pub.h>
#include "crypto_backend.h" #include "crypto_backend.h"
static int crypto_backend_initialised = 0; static int crypto_backend_initialised = 0;

View File

@@ -179,7 +179,7 @@ int crypt_hmac_restart(struct crypt_hmac *ctx)
int crypt_hmac_write(struct crypt_hmac *ctx, const char *buffer, size_t length) int crypt_hmac_write(struct crypt_hmac *ctx, const char *buffer, size_t length)
{ {
HMAC_Update(&ctx->md, buffer, length); HMAC_Update(&ctx->md, (const unsigned char *)buffer, length);
return 0; return 0;
} }

View File

@@ -219,7 +219,7 @@ If you want to set a new key via a key file, you have to use a positional arg to
If the key file is "-", stdin will be used. With the "-" key file reading will If the key file is "-", stdin will be used. With the "-" key file reading will
not stop when new line character is detected. See section \fBNOTES ON PASSWORD PROCESSING\fR for more information. not stop when new line character is detected. See section \fBNOTES ON PASSWORD PROCESSING\fR for more information.
.TP .TP
.B "\-\-keyfile-size, \-d \fIvalue\fR" .B "\-\-keyfile-size, \-l \fIvalue\fR"
Limits read from keyfile to \fIvalue\fR bytes. Limits read from keyfile to \fIvalue\fR bytes.
Usable together with all comands using key file. Usable together with all comands using key file.
.TP .TP

View File

@@ -719,6 +719,9 @@ static int action_luksChangeKey(int arg)
if ((r = crypt_load(cd, CRYPT_LUKS1, NULL))) if ((r = crypt_load(cd, CRYPT_LUKS1, NULL)))
goto out; goto out;
if (opt_iteration_time)
crypt_set_iterarion_time(cd, opt_iteration_time);
r = crypt_get_key(_("Enter LUKS passphrase to be changed: "), r = crypt_get_key(_("Enter LUKS passphrase to be changed: "),
&password, &passwordLen, &password, &passwordLen,
opt_keyfile_size, opt_key_file, opt_timeout, opt_keyfile_size, opt_key_file, opt_timeout,