summaryrefslogtreecommitdiffstats
path: root/userspace
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-28 20:26:44 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2010-07-28 20:28:10 +0200
commit7a31387b49e0b04ba43bdf6fbc869c6a3e970251 (patch)
tree568ab043a8df33cd114e8cf236062bbdf10c7cc9 /userspace
parentbe973132e3717f46bbc7b5e54889ec5736c4f9a6 (diff)
downloadcryptodev-linux-7a31387b49e0b04ba43bdf6fbc869c6a3e970251.tar.gz
cryptodev-linux-7a31387b49e0b04ba43bdf6fbc869c6a3e970251.tar.xz
cryptodev-linux-7a31387b49e0b04ba43bdf6fbc869c6a3e970251.zip
NCR_CIPHER_MAX_KEY_LEN no longer exist in userspace API.
Diffstat (limited to 'userspace')
-rw-r--r--userspace/setkey.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/userspace/setkey.c b/userspace/setkey.c
index d0a2b62..ea9d30e 100644
--- a/userspace/setkey.c
+++ b/userspace/setkey.c
@@ -25,6 +25,7 @@ int main(int argc, char** argv)
struct ncr_master_key_st key;
int size, ret;
struct stat st;
+ uint8_t rawkey[32];
if (argc != 2) {
fprintf(stderr, "Usage: setkey [filename]\n");
@@ -52,12 +53,13 @@ int main(int argc, char** argv)
exit(1);
}
- size = fread(key.key, 1, sizeof(key.key), fp);
+ size = fread(rawkey, 1, sizeof(rawkey), fp);
if (size < 16) {
fprintf(stderr, "Illegal key!\n");
exit(1);
}
fclose(fp);
+ key.key = rawkey;
key.key_size = size;
/* Open the crypto device */