Fix displaying error for not supported BitLocker key decryption

'crypt_bitlk_decrypt_key' can also fail because of wrong
passphrase and other reasons.
This commit is contained in:
Vojtěch Trefný
2019-11-14 12:58:33 +01:00
committed by Milan Broz
parent fad592b512
commit 97e39f0744

View File

@@ -787,7 +787,8 @@ static int decrypt_key(struct crypt_device *cd,
r = crypt_bitlk_decrypt_key(key->key, key->keylength, enc_key->key, outbuf, enc_key->keylength,
(const char*)iv, iv_size, (const char*)tag, tag_size);
if (r < 0) {
log_err(cd, _("This operation is not supported."));
if (r == -ENOTSUP)
log_err(cd, _("This operation is not supported."));
crypt_safe_free(outbuf);
return r;
}