From 9ea8ffaa934b50ced391817ce2e11527f5426f22 Mon Sep 17 00:00:00 2001 From: Miloslav Trmač Date: Sat, 24 Jul 2010 01:31:44 +0200 Subject: Replace ncr_algoritm_to_key_type by a struct member Also handle some algorithms missing in the function. --- ncr-key.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ncr-key.c') diff --git a/ncr-key.c b/ncr-key.c index 4aa6a06..82a3818 100644 --- a/ncr-key.c +++ b/ncr-key.c @@ -443,7 +443,7 @@ size_t size; err(); return ret; } - item->type = ncr_algorithm_to_key_type(algo); + item->type = algo->key_type; if (item->type == NCR_KEY_TYPE_SECRET) { /* arbitrary */ item->algorithm = _ncr_algo_to_properties(NCR_ALG_AES_CBC); @@ -539,7 +539,7 @@ int ret; ret = -EINVAL; goto fail; } - public->type = ncr_algorithm_to_key_type(public->algorithm); + public->type = public->algorithm->key_type; private->type = NCR_KEY_TYPE_PRIVATE; public->flags |= (NCR_KEY_FLAG_EXPORTABLE|NCR_KEY_FLAG_WRAPPABLE); -- cgit