Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * AppArmor security module
4 *
5 * This file contains AppArmor policy loading interface function definitions.
6 *
7 * Copyright 2013 Canonical Ltd.
8 */
9
10#ifndef __APPARMOR_CRYPTO_H
11#define __APPARMOR_CRYPTO_H
12
13#include "policy.h"
14
15#ifdef CONFIG_SECURITY_APPARMOR_HASH
16int init_profile_hash(void);
17unsigned int aa_hash_size(void);
18char *aa_calc_hash(void *data, size_t len);
19int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start,
20 size_t len);
21#else
22static inline char *aa_calc_hash(void *data, size_t len)
23{
24 return NULL;
25}
26static inline int aa_calc_profile_hash(struct aa_profile *profile, u32 version,
27 void *start, size_t len)
28{
29 return 0;
30}
31
32static inline unsigned int aa_hash_size(void)
33{
34 return 0;
35}
36#endif
37
38#endif /* __APPARMOR_CRYPTO_H */