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.c | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'ncr.c') diff --git a/ncr.c b/ncr.c index f68a1d8..7014a30 100644 --- a/ncr.c +++ b/ncr.c @@ -173,31 +173,3 @@ ncr_ioctl(struct ncr_lists* lst, struct file *filp, return -EINVAL; } } - -/* Returns NCR_KEY_TYPE_SECRET if a secret key algorithm or MAC is given, - * and NCR_KEY_TYPE_PUBLIC if a public key algorithm is given. - */ -ncr_key_type_t ncr_algorithm_to_key_type(const struct algo_properties_st *algo) -{ - switch(algo->algo) { - case NCR_ALG_3DES_CBC: - case NCR_ALG_AES_CBC: - case NCR_ALG_CAMELLIA_CBC: - case NCR_ALG_ARCFOUR: - case NCR_ALG_HMAC_SHA1: - case NCR_ALG_HMAC_MD5: - case NCR_ALG_HMAC_SHA2_224: - case NCR_ALG_HMAC_SHA2_256: - case NCR_ALG_HMAC_SHA2_384: - case NCR_ALG_HMAC_SHA2_512: - return NCR_KEY_TYPE_SECRET; - case NCR_ALG_RSA: - case NCR_ALG_DSA: - return NCR_KEY_TYPE_PUBLIC; - default: - return NCR_KEY_TYPE_INVALID; - } - -} - - -- cgit