Split salt from other requests in RNG backend.

This commit is contained in:
Milan Broz
2012-05-20 22:32:25 +02:00
parent 54b21c6e46
commit 0f4431d0bb
3 changed files with 6 additions and 3 deletions

View File

@@ -635,7 +635,7 @@ int LUKS_generate_phdr(struct luks_phdr *header,
header->version, header->hashSpec ,header->cipherName, header->cipherMode,
header->keyBytes);
r = crypt_random_get(ctx, header->mkDigestSalt, LUKS_SALTSIZE, CRYPT_RND_NORMAL);
r = crypt_random_get(ctx, header->mkDigestSalt, LUKS_SALTSIZE, CRYPT_RND_SALT);
if(r < 0) {
log_err(ctx, _("Cannot create LUKS header: reading random salt failed.\n"));
return r;
@@ -752,7 +752,7 @@ int LUKS_set_key(const char *device, unsigned int keyIndex,
return -ENOMEM;
r = crypt_random_get(ctx, hdr->keyblock[keyIndex].passwordSalt,
LUKS_SALTSIZE, CRYPT_RND_NORMAL);
LUKS_SALTSIZE, CRYPT_RND_SALT);
if (r < 0)
return r;