1 /* SPDX-License-Identifier: GPL-2.0 */ 1 2 #ifndef __ENCRYPTED_KEY_H 3 #define __ENCRYPTED_KEY_H 4 5 #define ENCRYPTED_DEBUG 0 6 #if defined(CONFIG_TRUSTED_KEYS) || \ 7 (defined(CONFIG_TRUSTED_KEYS_MODULE) && defi 8 extern struct key *request_trusted_key(const c 9 const u 10 #else 11 static inline struct key *request_trusted_key( 12 13 14 { 15 return ERR_PTR(-EOPNOTSUPP); 16 } 17 #endif 18 19 #if ENCRYPTED_DEBUG 20 static inline void dump_master_key(const u8 *m 21 { 22 print_hex_dump(KERN_ERR, "master key: 23 master_key, master_keyl 24 } 25 26 static inline void dump_decrypted_data(struct 27 { 28 print_hex_dump(KERN_ERR, "decrypted da 29 epayload->decrypted_dat 30 epayload->decrypted_dat 31 } 32 33 static inline void dump_encrypted_data(struct 34 unsigne 35 { 36 print_hex_dump(KERN_ERR, "encrypted da 37 epayload->encrypted_dat 38 } 39 40 static inline void dump_hmac(const char *str, 41 unsigned int hmac 42 { 43 if (str) 44 pr_info("encrypted_key: %s", s 45 print_hex_dump(KERN_ERR, "hmac: ", DUM 46 hmac_size, 0); 47 } 48 #else 49 static inline void dump_master_key(const u8 *m 50 { 51 } 52 53 static inline void dump_decrypted_data(struct 54 { 55 } 56 57 static inline void dump_encrypted_data(struct 58 unsigne 59 { 60 } 61 62 static inline void dump_hmac(const char *str, 63 unsigned int hmac 64 { 65 } 66 #endif 67 #endif 68
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.