mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Fix cipher_null key setting in kernel crypto backend.
This commit is contained in:
@@ -123,8 +123,10 @@ int crypt_cipher_init(struct crypt_cipher **ctx, const char *name,
|
|||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length && strcmp(name, "cipher_null") &&
|
if (!strcmp(name, "cipher_null"))
|
||||||
setsockopt(h->tfmfd, SOL_ALG, ALG_SET_KEY, buffer, length) < 0) {
|
length = 0;
|
||||||
|
|
||||||
|
if (setsockopt(h->tfmfd, SOL_ALG, ALG_SET_KEY, buffer, length) < 0) {
|
||||||
crypt_cipher_destroy(h);
|
crypt_cipher_destroy(h);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user