summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
}