mirror of
https://github.com/yuzu-mirror/mbedtls.git
synced 2026-04-20 22:05:15 +00:00
Rename config.h to mbedtls_config.h
This commit was generated using the following script: # ======================== #!/bin/sh git ls-files | grep -v '^ChangeLog' | xargs sed -b -E -i ' s/((check|crypto|full|mbedtls|query)_config)\.h/\1\nh/g s/config\.h/mbedtls_config.h/g y/\n/./ ' mv include/mbedtls/config.h include/mbedtls/mbedtls_config.h # ======================== Signed-off-by: Bence Szépkúti <bence.szepkuti@arm.com>
This commit is contained in:
parent
2893269cbb
commit
bb0cfeb2d4
71 changed files with 127 additions and 127 deletions
|
|
@ -74,7 +74,7 @@ FILTER=""
|
|||
# exclude:
|
||||
# - NULL: excluded from our default config
|
||||
# avoid plain DES but keep 3DES-EDE-CBC (mbedTLS), DES-CBC3 (OpenSSL)
|
||||
# - ARIA: not in default config.h + requires OpenSSL >= 1.1.1
|
||||
# - ARIA: not in default mbedtls_config.h + requires OpenSSL >= 1.1.1
|
||||
# - ChachaPoly: requires OpenSSL >= 1.1.0
|
||||
# - 3DES: not in default config
|
||||
EXCLUDE='NULL\|DES\|ARIA\|CHACHA20-POLY1305'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* config.h wrapper that forces calloc(0) to return NULL.
|
||||
/* mbedtls_config.h wrapper that forces calloc(0) to return NULL.
|
||||
* Used for testing.
|
||||
*/
|
||||
/*
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "mbedtls/config.h"
|
||||
#include "mbedtls/mbedtls_config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
static inline void *custom_calloc( size_t nmemb, size_t size )
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
# Warning: the test is destructive. It includes various build modes and
|
||||
# configurations, and can and will arbitrarily change the current CMake
|
||||
# configuration. The following files must be committed into git:
|
||||
# * include/mbedtls/config.h
|
||||
# * include/mbedtls/mbedtls_config.h
|
||||
# * Makefile, library/Makefile, programs/Makefile, tests/Makefile,
|
||||
# programs/fuzz/Makefile
|
||||
# After running this script, the CMake cache will be lost and CMake
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
# means that components can assume that the working directory is in a
|
||||
# cleaned-up state, and don't need to perform the cleanup themselves.
|
||||
# * Run `make clean`.
|
||||
# * Restore `include/mbedtks/config.h` from a backup made before running
|
||||
# * Restore `include/mbedtks/mbedtls_config.h` from a backup made before running
|
||||
# the component.
|
||||
# * Check out `Makefile`, `library/Makefile`, `programs/Makefile`,
|
||||
# `tests/Makefile` and `programs/fuzz/Makefile` from git.
|
||||
|
|
@ -125,7 +125,7 @@ pre_check_environment () {
|
|||
}
|
||||
|
||||
pre_initialize_variables () {
|
||||
CONFIG_H='include/mbedtls/config.h'
|
||||
CONFIG_H='include/mbedtls/mbedtls_config.h'
|
||||
CONFIG_BAK="$CONFIG_H.bak"
|
||||
CRYPTO_CONFIG_H='include/psa/crypto_config.h'
|
||||
CRYPTO_CONFIG_BAK="$CRYPTO_CONFIG_H.bak"
|
||||
|
|
@ -463,8 +463,8 @@ pre_check_git () {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! git diff --quiet include/mbedtls/config.h; then
|
||||
err_msg "Warning - the configuration file 'include/mbedtls/config.h' has been edited. "
|
||||
if ! git diff --quiet include/mbedtls/mbedtls_config.h; then
|
||||
err_msg "Warning - the configuration file 'include/mbedtls/mbedtls_config.h' has been edited. "
|
||||
echo "You can either delete or preserve your work, or force the test by rerunning the"
|
||||
echo "script as: $0 --force"
|
||||
exit 1
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
#
|
||||
# The tests focus on functionality and do not consider performance.
|
||||
#
|
||||
# Note the tests self-adapt due to configurations in include/mbedtls/config.h
|
||||
# Note the tests self-adapt due to configurations in include/mbedtls/mbedtls_config.h
|
||||
# which can lead to some tests being skipped, and can cause the number of
|
||||
# available tests to fluctuate.
|
||||
#
|
||||
|
|
@ -68,7 +68,7 @@ export OPENSSL_CMD="$OPENSSL"
|
|||
export GNUTLS_CLI="$GNUTLS_CLI"
|
||||
export GNUTLS_SERV="$GNUTLS_SERV"
|
||||
|
||||
CONFIG_H='include/mbedtls/config.h'
|
||||
CONFIG_H='include/mbedtls/mbedtls_config.h'
|
||||
CONFIG_BAK="$CONFIG_H.bak"
|
||||
|
||||
# Step 0 - print build environment info
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
#
|
||||
# This script should be executed from the root of the project directory.
|
||||
#
|
||||
# Only curves that are enabled in config.h will be tested.
|
||||
# Only curves that are enabled in mbedtls_config.h will be tested.
|
||||
#
|
||||
# For best effect, run either with cmake disabled, or cmake enabled in a mode
|
||||
# that includes -Werror.
|
||||
|
|
@ -47,7 +47,7 @@ use strict;
|
|||
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
||||
|
||||
my $sed_cmd = 's/^#define \(MBEDTLS_ECP_DP.*_ENABLED\)/\1/p';
|
||||
my $config_h = 'include/mbedtls/config.h';
|
||||
my $config_h = 'include/mbedtls/mbedtls_config.h';
|
||||
my @curves = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
|
||||
|
||||
# Determine which curves support ECDSA by checking the dependencies of
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ use strict;
|
|||
|
||||
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
||||
|
||||
my $config_h = 'include/mbedtls/config.h';
|
||||
my $config_h = 'include/mbedtls/mbedtls_config.h';
|
||||
|
||||
# as many SSL options depend on specific hashes,
|
||||
# and SSL is not in the test suites anyways,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ use strict;
|
|||
|
||||
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
||||
|
||||
my $config_h = 'include/mbedtls/config.h';
|
||||
my $config_h = 'include/mbedtls/mbedtls_config.h';
|
||||
|
||||
# Some algorithms can't be disabled on their own as others depend on them, so
|
||||
# we list those reverse-dependencies here to keep check_config.h happy.
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ use strict;
|
|||
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
||||
|
||||
my $sed_cmd = 's/^#define \(MBEDTLS_KEY_EXCHANGE_.*_ENABLED\)/\1/p';
|
||||
my $config_h = 'include/mbedtls/config.h';
|
||||
my $config_h = 'include/mbedtls/mbedtls_config.h';
|
||||
my @kexes = split( /\s+/, `sed -n -e '$sed_cmd' $config_h` );
|
||||
|
||||
system( "cp $config_h $config_h.bak" ) and die;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ if grep -i cmake Makefile >/dev/null; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
cp include/mbedtls/config.h include/mbedtls/config.h.bak
|
||||
cp include/mbedtls/mbedtls_config.h include/mbedtls/mbedtls_config.h.bak
|
||||
scripts/config.py full
|
||||
make clean
|
||||
make_ret=
|
||||
|
|
@ -39,7 +39,7 @@ CFLAGS=-fno-asynchronous-unwind-tables make lib \
|
|||
cat list-symbols.make.log >&2
|
||||
}
|
||||
rm list-symbols.make.log
|
||||
mv include/mbedtls/config.h.bak include/mbedtls/config.h
|
||||
mv include/mbedtls/mbedtls_config.h.bak include/mbedtls/mbedtls_config.h
|
||||
if [ -n "$make_ret" ]; then
|
||||
exit "$make_ret"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import re
|
|||
import sys
|
||||
|
||||
CLASSIC_DEPENDENCIES = frozenset([
|
||||
# This list is manually filtered from config.h.
|
||||
# This list is manually filtered from mbedtls_config.h.
|
||||
|
||||
# Mbed TLS feature support.
|
||||
# Only features that affect what can be done are listed here.
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ if ($#ARGV >= 0) {
|
|||
|
||||
-d 'library' && -d 'include' && -d 'tests' or die "Must be run from root\n";
|
||||
|
||||
my $config_h = 'include/mbedtls/config.h';
|
||||
my $config_h = 'include/mbedtls/mbedtls_config.h';
|
||||
|
||||
system( "cp $config_h $config_h.bak" ) and die;
|
||||
sub abort {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ This is a harness to help regression testing, not a functional tester.
|
|||
Sample usage:
|
||||
|
||||
test_config_script.py -d old
|
||||
## Modify config.py and/or config.h ##
|
||||
## Modify config.py and/or mbedtls_config.h ##
|
||||
test_config_script.py -d new
|
||||
diff -ru old new
|
||||
"""
|
||||
|
|
@ -170,7 +170,7 @@ def main():
|
|||
dest='output_directory', required=True,
|
||||
help="""Output directory.""")
|
||||
parser.add_argument('-f', metavar='FILE',
|
||||
dest='input_file', default='include/mbedtls/config.h',
|
||||
dest='input_file', default='include/mbedtls/mbedtls_config.h',
|
||||
help="""Config file (default: %(default)s).""")
|
||||
parser.add_argument('-p', metavar='PRESET,...',
|
||||
dest='presets',
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ fi
|
|||
: ${PERL:=perl}
|
||||
|
||||
guess_config_name() {
|
||||
if git diff --quiet ../include/mbedtls/config.h 2>/dev/null; then
|
||||
if git diff --quiet ../include/mbedtls/mbedtls_config.h 2>/dev/null; then
|
||||
echo "default"
|
||||
else
|
||||
echo "unknown"
|
||||
|
|
@ -93,7 +93,7 @@ TESTS=0
|
|||
FAILS=0
|
||||
SKIPS=0
|
||||
|
||||
CONFIG_H='../include/mbedtls/config.h'
|
||||
CONFIG_H='../include/mbedtls/mbedtls_config.h'
|
||||
|
||||
MEMCHECK=0
|
||||
FILTER='.*'
|
||||
|
|
@ -178,7 +178,7 @@ case "$MBEDTLS_TEST_OUTCOME_FILE" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Read boolean configuration options from config.h for easy and quick
|
||||
# Read boolean configuration options from mbedtls_config.h for easy and quick
|
||||
# testing. Skip non-boolean options (with something other than spaces
|
||||
# and a comment after "#define SYMBOL"). The variable contains a
|
||||
# space-separated list of symbols.
|
||||
|
|
@ -194,7 +194,7 @@ skip_next_test() {
|
|||
SKIP_NEXT="YES"
|
||||
}
|
||||
|
||||
# skip next test if the flag is not enabled in config.h
|
||||
# skip next test if the flag is not enabled in mbedtls_config.h
|
||||
requires_config_enabled() {
|
||||
case $CONFIGS_ENABLED in
|
||||
*" $1 "*) :;;
|
||||
|
|
@ -202,7 +202,7 @@ requires_config_enabled() {
|
|||
esac
|
||||
}
|
||||
|
||||
# skip next test if the flag is enabled in config.h
|
||||
# skip next test if the flag is enabled in mbedtls_config.h
|
||||
requires_config_disabled() {
|
||||
case $CONFIGS_ENABLED in
|
||||
*" $1 "*) SKIP_NEXT="YES";;
|
||||
|
|
@ -3146,7 +3146,7 @@ run_test "Renegotiation: server-initiated" \
|
|||
|
||||
# Checks that no Signature Algorithm with SHA-1 gets negotiated. Negotiating SHA-1 would mean that
|
||||
# the server did not parse the Signature Algorithm extension. This test is valid only if an MD
|
||||
# algorithm stronger than SHA-1 is enabled in config.h
|
||||
# algorithm stronger than SHA-1 is enabled in mbedtls_config.h
|
||||
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
|
||||
run_test "Renegotiation: Signature Algorithms parsing, client-initiated" \
|
||||
"$P_SRV debug_level=3 exchanges=2 renegotiation=1 auth_mode=optional" \
|
||||
|
|
@ -3164,7 +3164,7 @@ run_test "Renegotiation: Signature Algorithms parsing, client-initiated" \
|
|||
|
||||
# Checks that no Signature Algorithm with SHA-1 gets negotiated. Negotiating SHA-1 would mean that
|
||||
# the server did not parse the Signature Algorithm extension. This test is valid only if an MD
|
||||
# algorithm stronger than SHA-1 is enabled in config.h
|
||||
# algorithm stronger than SHA-1 is enabled in mbedtls_config.h
|
||||
requires_config_enabled MBEDTLS_SSL_RENEGOTIATION
|
||||
run_test "Renegotiation: Signature Algorithms parsing, server-initiated" \
|
||||
"$P_SRV debug_level=3 exchanges=2 renegotiation=1 auth_mode=optional renegotiate=1" \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue