summaryrefslogtreecommitdiffstats
path: root/ncr-key.c
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2010-07-24 01:31:44 +0200
committerMiloslav Trmač <mitr@redhat.com>2010-07-24 01:32:21 +0200
commit9ea8ffaa934b50ced391817ce2e11527f5426f22 (patch)
tree1444f4d02a65c97116774b311a6938b9159ffe07 /ncr-key.c
parent9ea47f5b396bb1e767d4a231bc7166efd3dffd3e (diff)
downloadcryptodev-linux-9ea8ffaa934b50ced391817ce2e11527f5426f22.tar.gz
cryptodev-linux-9ea8ffaa934b50ced391817ce2e11527f5426f22.tar.xz
cryptodev-linux-9ea8ffaa934b50ced391817ce2e11527f5426f22.zip
Replace ncr_algoritm_to_key_type by a struct member
Also handle some algorithms missing in the function.
Diffstat (limited to 'ncr-key.c')
-rw-r--r--ncr-key.c4
1 files changed, 2 insertions, 2 deletions
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);