Deleted Added
full compact
g_eli_hmac.c (167755) g_eli_hmac.c (172031)
1/*-
2 * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/geom/eli/g_eli_crypto.c 167755 2007-03-21 03:42:51Z sam $");
28__FBSDID("$FreeBSD: head/sys/geom/eli/g_eli_crypto.c 172031 2007-09-01 06:33:02Z pjd $");
29
30#include <sys/param.h>
31#ifdef _KERNEL
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/malloc.h>
35#include <sys/uio.h>
36#else

--- 116 unchanged lines hidden (view full) ---

153 break;
154 default:
155 return (EINVAL);
156 }
157 break;
158 case CRYPTO_BLF_CBC:
159 type = EVP_bf_cbc();
160 break;
29
30#include <sys/param.h>
31#ifdef _KERNEL
32#include <sys/systm.h>
33#include <sys/kernel.h>
34#include <sys/malloc.h>
35#include <sys/uio.h>
36#else

--- 116 unchanged lines hidden (view full) ---

153 break;
154 default:
155 return (EINVAL);
156 }
157 break;
158 case CRYPTO_BLF_CBC:
159 type = EVP_bf_cbc();
160 break;
161 case CRYPTO_CAMELLIA_CBC:
162 switch (keysize) {
163 case 128:
164 type = EVP_camellia_128_cbc();
165 break;
166 case 192:
167 type = EVP_camellia_192_cbc();
168 break;
169 case 256:
170 type = EVP_camellia_256_cbc();
171 break;
172 default:
173 return (EINVAL);
174 }
175 break;
161 case CRYPTO_3DES_CBC:
162 type = EVP_des_ede3_cbc();
163 break;
164 default:
165 return (EINVAL);
166 }
167
168 EVP_CIPHER_CTX_init(&ctx);

--- 108 unchanged lines hidden ---
176 case CRYPTO_3DES_CBC:
177 type = EVP_des_ede3_cbc();
178 break;
179 default:
180 return (EINVAL);
181 }
182
183 EVP_CIPHER_CTX_init(&ctx);

--- 108 unchanged lines hidden ---