summaryrefslogtreecommitdiffstats
path: root/sys/geom/eli/g_eli_crypto.c
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-09-01 06:33:02 +0000
committerpjd <pjd@FreeBSD.org>2007-09-01 06:33:02 +0000
commit9afb74d04914b9d6ab998cb5c47f761f326e9961 (patch)
treed9ebf6d71be9eb475dfffdb174dd1a4ef169db01 /sys/geom/eli/g_eli_crypto.c
parent3ee1ed30a1cb2db54f874866c48d04aba457b560 (diff)
downloadFreeBSD-src-9afb74d04914b9d6ab998cb5c47f761f326e9961.zip
FreeBSD-src-9afb74d04914b9d6ab998cb5c47f761f326e9961.tar.gz
Add support for Camellia encryption algorithm.
PR: kern/113790 Submitted by: Yoshisato YANAGISAWA <yanagisawa@csg.is.titech.ac.jp> Approved by: re (bmah)
Diffstat (limited to 'sys/geom/eli/g_eli_crypto.c')
-rw-r--r--sys/geom/eli/g_eli_crypto.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/sys/geom/eli/g_eli_crypto.c b/sys/geom/eli/g_eli_crypto.c
index b484f90..c26b367 100644
--- a/sys/geom/eli/g_eli_crypto.c
+++ b/sys/geom/eli/g_eli_crypto.c
@@ -158,6 +158,21 @@ g_eli_crypto_cipher(u_int algo, int enc, u_char *data, size_t datasize,
case CRYPTO_BLF_CBC:
type = EVP_bf_cbc();
break;
+ case CRYPTO_CAMELLIA_CBC:
+ switch (keysize) {
+ case 128:
+ type = EVP_camellia_128_cbc();
+ break;
+ case 192:
+ type = EVP_camellia_192_cbc();
+ break;
+ case 256:
+ type = EVP_camellia_256_cbc();
+ break;
+ default:
+ return (EINVAL);
+ }
+ break;
case CRYPTO_3DES_CBC:
type = EVP_des_ede3_cbc();
break;
OpenPOWER on IntegriCloud