.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2006 |
---|
3 | 4 | * NTT (Nippon Telegraph and Telephone Corporation). |
---|
4 | | - * |
---|
5 | | - * This program is free software; you can redistribute it and/or |
---|
6 | | - * modify it under the terms of the GNU General Public License |
---|
7 | | - * as published by the Free Software Foundation; either version 2 |
---|
8 | | - * of the License, or (at your option) any later version. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | | - * |
---|
15 | | - * You should have received a copy of the GNU General Public License |
---|
16 | | - * along with this program. If not, see <http://www.gnu.org/licenses/>. |
---|
17 | 5 | */ |
---|
18 | 6 | |
---|
19 | 7 | /* |
---|
20 | 8 | * Algorithm Specification |
---|
21 | | - * http://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html |
---|
| 9 | + * https://info.isl.ntt.co.jp/crypt/eng/camellia/specifications.html |
---|
22 | 10 | */ |
---|
23 | 11 | |
---|
24 | 12 | /* |
---|
.. | .. |
---|
982 | 970 | { |
---|
983 | 971 | struct camellia_ctx *cctx = crypto_tfm_ctx(tfm); |
---|
984 | 972 | const unsigned char *key = (const unsigned char *)in_key; |
---|
985 | | - u32 *flags = &tfm->crt_flags; |
---|
986 | 973 | |
---|
987 | | - if (key_len != 16 && key_len != 24 && key_len != 32) { |
---|
988 | | - *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN; |
---|
| 974 | + if (key_len != 16 && key_len != 24 && key_len != 32) |
---|
989 | 975 | return -EINVAL; |
---|
990 | | - } |
---|
991 | 976 | |
---|
992 | 977 | cctx->key_length = key_len; |
---|
993 | 978 | |
---|
.. | .. |
---|
1092 | 1077 | crypto_unregister_alg(&camellia_alg); |
---|
1093 | 1078 | } |
---|
1094 | 1079 | |
---|
1095 | | -module_init(camellia_init); |
---|
| 1080 | +subsys_initcall(camellia_init); |
---|
1096 | 1081 | module_exit(camellia_fini); |
---|
1097 | 1082 | |
---|
1098 | 1083 | MODULE_DESCRIPTION("Camellia Cipher Algorithm"); |
---|