projects
/
platform
/
upstream
/
cryptsetup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25512d8
)
Do not ignore errors in crypto backend (loopaes mode).
author
Milan Broz
<gmazyland@gmail.com>
Sun, 13 Mar 2011 23:50:57 +0000
(23:50 +0000)
committer
Milan Broz
<gmazyland@gmail.com>
Sun, 13 Mar 2011 23:50:57 +0000
(23:50 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@452
36d66b0a
-2a48-0410-832c-
cd162a569da5
lib/loopaes/loopaes.c
patch
|
blob
|
history
diff --git
a/lib/loopaes/loopaes.c
b/lib/loopaes/loopaes.c
index
5e7ad20
..
3f0f055
100644
(file)
--- a/
lib/loopaes/loopaes.c
+++ b/
lib/loopaes/loopaes.c
@@
-54,13
+54,17
@@
static int hash_key(const char *src, size_t src_len,
const char *hash_name)
{
struct crypt_hash *hd = NULL;
+ int r;
if (crypt_hash_init(&hd, hash_name))
return -EINVAL;
- crypt_hash_write(hd, src, src_len);
- crypt_hash_final(hd, dst, dst_len);
+
+ r = crypt_hash_write(hd, src, src_len);
+ if (!r)
+ r = crypt_hash_final(hd, dst, dst_len);
+out:
crypt_hash_destroy(hd);
- return
0
;
+ return
r
;
}
static int hash_keys(struct volume_key **vk,