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_P11KIT && HAVE_OPENSSL
10 int enroll_pkcs11(struct crypt_device *cd, const void *volume_key, size_t volume_key_size, const char *uri);
11 #else
enroll_pkcs11(struct crypt_device * cd,const void * volume_key,size_t volume_key_size,const char * uri)12 static inline int enroll_pkcs11(struct crypt_device *cd, const void *volume_key, size_t volume_key_size, const char *uri) {
13         return log_debug_errno(SYNTHETIC_ERRNO(EOPNOTSUPP),
14                                "PKCS#11 key enrollment not supported.");
15 }
16 #endif
17