summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-08-27 09:01:21 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-08-27 09:01:56 +0200
commit4d969f0e12517e49a60c2a2b146ba2f650e7f61b (patch)
tree9e5e32ba5eed437873599f0ed98d130ba6e5d75a
parent387d5847ee502cdb03bbf5771575438ddebf2624 (diff)
downloadkernel-crypto-4d969f0e12517e49a60c2a2b146ba2f650e7f61b.tar.gz
kernel-crypto-4d969f0e12517e49a60c2a2b146ba2f650e7f61b.tar.xz
kernel-crypto-4d969f0e12517e49a60c2a2b146ba2f650e7f61b.zip
Allow sharing keys for "regular" and "transparent" algorithms
-rw-r--r--ncr-pk.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ncr-pk.c b/ncr-pk.c
index c6055dba1d5..9b9078efe38 100644
--- a/ncr-pk.c
+++ b/ncr-pk.c
@@ -358,7 +358,9 @@ int ncr_pk_cipher_init(const struct algo_properties_st *algo,
memset(ctx, 0, sizeof(*ctx));
- if (key->algorithm != algo) {
+ /* Allow using the same key for transparent and non-transparent
+ hashing. */
+ if (key->algorithm->algo != algo->algo) {
err();
return -EINVAL;
}