From be3a4406d2a209c6f030df02f404588f61058255 Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Wed, 5 Dec 2018 20:37:20 +0000 Subject: [PATCH] Deprecate MBEDTLS_PKCS11_C feature --- include/mbedtls/check_config.h | 8 ++++++++ include/mbedtls/config.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/include/mbedtls/check_config.h b/include/mbedtls/check_config.h index 6ebe6b7b6..c7b6e4e51 100644 --- a/include/mbedtls/check_config.h +++ b/include/mbedtls/check_config.h @@ -774,6 +774,14 @@ #error "MBEDTLS_HAVE_INT32/MBEDTLS_HAVE_INT64 and MBEDTLS_HAVE_ASM cannot be defined simultaneously" #endif /* (MBEDTLS_HAVE_INT32 || MBEDTLS_HAVE_INT64) && MBEDTLS_HAVE_ASM */ +#if defined(MBEDTLS_PKCS11_C) +#if defined(MBEDTLS_DEPRECATED_REMOVED) +#error "MBEDTLS_PKCS11_C is deprecated and will likely be removed in a future version of Mbed TLS" +#elif defined(MBEDTLS_DEPRECATED_WARNING) +#warning "MBEDTLS_PKCS11_C is deprecated and will likely be removed in a future version of Mbed TLS" +#endif +#endif /* MBEDTLS_PKCS11_C */ + /* * Avoid warning from -pedantic. This is a convenient place for this * workaround since this is included by every single file before the diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h index 058969b73..789ba5bf2 100644 --- a/include/mbedtls/config.h +++ b/include/mbedtls/config.h @@ -2814,6 +2814,9 @@ * * Enable wrapper for PKCS#11 smartcard support. * + * \deprecated This option is deprecated and will likely be removed in a + * future version of Mbed TLS. + * * Module: library/pkcs11.c * Caller: library/pk.c *