1 /* SPDX-License-Identifier: GPL-2.0-only */ << 2 /* 1 /* 3 * AppArmor security module 2 * AppArmor security module 4 * 3 * 5 * This file contains AppArmor policy loading 4 * This file contains AppArmor policy loading interface function definitions. 6 * 5 * 7 * Copyright 2013 Canonical Ltd. 6 * 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. 8 */ 12 */ 9 13 10 #ifndef __APPARMOR_CRYPTO_H 14 #ifndef __APPARMOR_CRYPTO_H 11 #define __APPARMOR_CRYPTO_H 15 #define __APPARMOR_CRYPTO_H 12 16 13 #include "policy.h" 17 #include "policy.h" 14 18 15 #ifdef CONFIG_SECURITY_APPARMOR_HASH 19 #ifdef CONFIG_SECURITY_APPARMOR_HASH 16 unsigned int aa_hash_size(void); 20 unsigned int aa_hash_size(void); 17 char *aa_calc_hash(void *data, size_t len); 21 char *aa_calc_hash(void *data, size_t len); 18 int aa_calc_profile_hash(struct aa_profile *pr 22 int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start, 19 size_t len); 23 size_t len); 20 #else 24 #else 21 static inline char *aa_calc_hash(void *data, s 25 static inline char *aa_calc_hash(void *data, size_t len) 22 { 26 { 23 return NULL; 27 return NULL; 24 } 28 } 25 static inline int aa_calc_profile_hash(struct 29 static inline int aa_calc_profile_hash(struct aa_profile *profile, u32 version, 26 void *s 30 void *start, size_t len) 27 { 31 { 28 return 0; 32 return 0; 29 } 33 } 30 34 31 static inline unsigned int aa_hash_size(void) 35 static inline unsigned int aa_hash_size(void) 32 { 36 { 33 return 0; 37 return 0; 34 } 38 } 35 #endif 39 #endif 36 40 37 #endif /* __APPARMOR_CRYPTO_H */ 41 #endif /* __APPARMOR_CRYPTO_H */ 38 42
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.