X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcryptsetup%2Fcryptsetup.c;h=b9e67fa63ba8e2b4e12d5dc4a44e9a24a958ca94;hb=6357ac664c9ce8ae5b83bdb98011da24185e4efa;hp=94570eb82d07ac9b836907d86b8cadfb34305176;hpb=a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8;p=elogind.git diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index 94570eb82..b9e67fa63 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -400,7 +400,9 @@ static int attach_luks_or_plain(struct crypt_device *cd, /* plain isn't a real hash type. it just means "use no hash" */ if (!streq(arg_hash, "plain")) params.hash = arg_hash; - } else + } else if (!key_file) + /* for CRYPT_PLAIN, the behaviour of cryptsetup + * package is to not hash when a key file is provided */ params.hash = "ripemd160"; if (arg_cipher) {