From dc720b0a704e1b543c9a63c51f26eed7ac706150 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Mon, 4 Sep 2023 17:50:28 +0200 Subject: [PATCH] Split build_info.h: create mbedtls/config_adjust_x509.h There isn't anything to put in this file. Create it anyway for consistency with crypto and TLS. Signed-off-by: Gilles Peskine --- include/mbedtls/build_info.h | 2 ++ include/mbedtls/config_adjust_x509.h | 37 ++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 include/mbedtls/config_adjust_x509.h diff --git a/include/mbedtls/build_info.h b/include/mbedtls/build_info.h index 510e1a5d6..872e841b9 100644 --- a/include/mbedtls/build_info.h +++ b/include/mbedtls/build_info.h @@ -122,6 +122,8 @@ #include "mbedtls/config_adjust_legacy_crypto.h" +#include "mbedtls/config_adjust_x509.h" + /* The following blocks make it easier to disable all of TLS, * or of TLS 1.2 or 1.3 or DTLS, without having to manually disable all * key exchanges, options and extensions related to them. */ diff --git a/include/mbedtls/config_adjust_x509.h b/include/mbedtls/config_adjust_x509.h new file mode 100644 index 000000000..99a0ace2f --- /dev/null +++ b/include/mbedtls/config_adjust_x509.h @@ -0,0 +1,37 @@ +/** + * \file mbedtls/config_adjust_x509.h + * \brief Adjust X.509 configuration + * + * Automatically enable certain dependencies. Generally, MBEDLTS_xxx + * configurations need to be explicitly enabled by the user: enabling + * MBEDTLS_xxx_A but not MBEDTLS_xxx_B when A requires B results in a + * compilation error. However, we do automatically enable certain options + * in some circumstances. One case is if MBEDTLS_xxx_B is an internal option + * used to identify parts of a module that are used by other module, and we + * don't want to make the symbol MBEDTLS_xxx_B part of the public API. + * Another case is if A didn't depend on B in earlier versions, and we + * want to use B in A but we need to preserve backward compatibility with + * configurations that explicitly activate MBEDTLS_xxx_A but not + * MBEDTLS_xxx_B. + */ +/* + * Copyright The Mbed TLS Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef MBEDTLS_CONFIG_ADJUST_X509_H +#define MBEDTLS_CONFIG_ADJUST_X509_H + +#endif /* MBEDTLS_CONFIG_ADJUST_X509_H */