1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 #pragma once
3 
4 #include <sys/types.h>
5 
6 #include "cryptsetup-util.h"
7 #include "log.h"
8 
9 #if HAVE_TPM2
10 int enroll_tpm2(struct crypt_device *cd, const void *volume_key, size_t volume_key_size, const char *device, uint32_t pcr_mask, bool use_pin);
11 #else
enroll_tpm2(struct crypt_device * cd,const void * volume_key,size_t volume_key_size,const char * device,uint32_t pcr_mask,bool use_pin)12 static inline int enroll_tpm2(struct crypt_device *cd, const void *volume_key, size_t volume_key_size, const char *device, uint32_t pcr_mask, bool use_pin) {
13         return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
14                                "TPM2 key enrollment not supported.");
15 }
16 #endif
17