1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Copyright (c) 2023 Hannes Reinecke, SUSE Labs 4 */ 5 6 #ifndef _NVME_KEYRING_H 7 #define _NVME_KEYRING_H 8 9 #ifdef CONFIG_NVME_KEYRING 10 11 key_serial_t nvme_tls_psk_default(struct key *keyring, 12 const char *hostnqn, const char *subnqn); 13 14 key_serial_t nvme_keyring_id(void); 15 int nvme_keyring_init(void); 16 void nvme_keyring_exit(void); 17 18 #else 19 20 static inline key_serial_t nvme_tls_psk_default(struct key *keyring, 21 const char *hostnqn, const char *subnqn) 22 { 23 return 0; 24 } 25 static inline key_serial_t nvme_keyring_id(void) 26 { 27 return 0; 28 } 29 static inline int nvme_keyring_init(void) 30 { 31 return 0; 32 } 33 static inline void nvme_keyring_exit(void) {} 34 35 #endif /* !CONFIG_NVME_KEYRING */ 36 #endif /* _NVME_KEYRING_H */ 37