hc
2024-01-31 f70575805708cabdedea7498aaa3f710fde4d920
kernel/security/apparmor/crypto.c
....@@ -1,14 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * AppArmor security module
34 *
45 * This file contains AppArmor policy loading interface function definitions.
56 *
67 * Copyright 2013 Canonical Ltd.
7
- *
8
- * This program is free software; you can redistribute it and/or
9
- * modify it under the terms of the GNU General Public License as
10
- * published by the Free Software Foundation, version 2 of the
11
- * License.
128 *
139 * Fns to provide a checksum of policy that has been loaded this can be
1410 * compared to userspace policy compiles to check loaded policy is what
....@@ -43,7 +39,6 @@
4339 goto fail;
4440
4541 desc->tfm = apparmor_tfm;
46
- desc->flags = 0;
4742
4843 error = crypto_shash_init(desc);
4944 if (error)
....@@ -81,7 +76,6 @@
8176 goto fail;
8277
8378 desc->tfm = apparmor_tfm;
84
- desc->flags = 0;
8579
8680 error = crypto_shash_init(desc);
8781 if (error)
....@@ -112,7 +106,7 @@
112106 if (!apparmor_initialized)
113107 return 0;
114108
115
- tfm = crypto_alloc_shash("sha1", 0, CRYPTO_ALG_ASYNC);
109
+ tfm = crypto_alloc_shash("sha1", 0, 0);
116110 if (IS_ERR(tfm)) {
117111 int error = PTR_ERR(tfm);
118112 AA_ERROR("failed to setup profile sha1 hashing: %d\n", error);