From 4d969f0e12517e49a60c2a2b146ba2f650e7f61b Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Fri, 27 Aug 2010 09:01:21 +0200 Subject: Allow sharing keys for "regular" and "transparent" algorithms --- ncr-pk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ncr-pk.c b/ncr-pk.c index c6055db..9b9078e 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; } -- cgit