diff options
author | Niels Provos <provos@cvs.openbsd.org> | 2000-06-19 14:24:08 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 2000-06-19 14:24:08 +0000 |
commit | 153de7d01d8a7f36c2494a42a73bab5fe367dbf4 (patch) | |
tree | e878d2f0f1ebadbaa5ec3ffa08298580467c19b6 /usr.bin/tcfs/tcfsgenkey.c | |
parent | b3b5bc44e416215ba12a9e7a0be889c8efd6b47a (diff) |
cleanup key encryption
Diffstat (limited to 'usr.bin/tcfs/tcfsgenkey.c')
-rw-r--r-- | usr.bin/tcfs/tcfsgenkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tcfs/tcfsgenkey.c b/usr.bin/tcfs/tcfsgenkey.c index d811fa846f4..54833865582 100644 --- a/usr.bin/tcfs/tcfsgenkey.c +++ b/usr.bin/tcfs/tcfsgenkey.c @@ -75,12 +75,12 @@ genkey_main (int argn, char *argv[]) /* * Encrypt the generated key with user password */ - cryptedkey = (char*)calloc(UUKEYSIZE, sizeof(char)); + cryptedkey = (char*)calloc(UUKEYSIZE + 1, sizeof(char)); if (!cryptedkey) tcfs_error (ER_MEM, NULL); - if (!tcfs_encrypt_key (user, passwd, newkey, cryptedkey, USERKEY)) + if (!tcfs_encrypt_key (passwd, newkey, KEYSIZE, cryptedkey, UUKEYSIZE + 1)) tcfs_error (ER_MEM, NULL); /* |