Merge branch 'development' into development-restricted
* development: (87 commits) entropy: Adjust parameter type of internal function to avoid a cast entropy: Avoid arithmetic on void pointer add comment about potential future extension Adjust comments about SEED synchronisation entropy: Rename sysctl_wrapper to sysctl_arnd_wrapper test_suite_x509parse.function improvement Pass "certificate policies" extension to callback Update iv and len context pointers manually when reallocating buffers Add Apache-2.0 headers to all source files Remove Dangerous Parameter Passing Add Apache-2.0 headers to all scripts Add missing copyright dates to scripts and sources Show failure in ssl-opts.sh when key export fails Add changelog entry tests: Reformating due to rnd_* renaming tests: Add mbedtls_test_ prefix to rnd_* symbols tests: Reformating due to hexcmp() renaming tests: Add mbedtls_test_ prefix to hexcmp() tests: Reformating due to unhexify_alloc() renaming tests: Add mbedtls_test_ prefix to unhexify_alloc() ...
This commit is contained in:
commit
db61c3503b
218 changed files with 4132 additions and 2453 deletions
|
@ -2,9 +2,22 @@
|
|||
|
||||
# all.sh
|
||||
#
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2014-2017, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
|
||||
|
||||
|
@ -120,8 +133,17 @@ pre_initialize_variables () {
|
|||
append_outcome=0
|
||||
MEMORY=0
|
||||
FORCE=0
|
||||
QUIET=0
|
||||
KEEP_GOING=0
|
||||
|
||||
# Seed value used with the --release-test option.
|
||||
#
|
||||
# See also RELEASE_SEED in basic-build-test.sh. Debugging is easier if
|
||||
# both values are kept in sync. If you change the value here because it
|
||||
# breaks some tests, you'll definitely want to change it in
|
||||
# basic-build-test.sh as well.
|
||||
RELEASE_SEED=1
|
||||
|
||||
: ${MBEDTLS_TEST_OUTCOME_FILE=}
|
||||
: ${MBEDTLS_TEST_PLATFORM="$(uname -s | tr -c \\n0-9A-Za-z _)-$(uname -m | tr -c \\n0-9A-Za-z _)"}
|
||||
export MBEDTLS_TEST_OUTCOME_FILE
|
||||
|
@ -200,6 +222,7 @@ Special options:
|
|||
--list-components List components supported on this platform and exit.
|
||||
|
||||
General options:
|
||||
-q|--quiet Only output component names, and errors if any.
|
||||
-f|--force Force the tests to overwrite any modified files.
|
||||
-k|--keep-going Run all tests and report errors at the end.
|
||||
-m|--memory Additional optional memory tests.
|
||||
|
@ -215,11 +238,12 @@ General options:
|
|||
--no-force Refuse to overwrite modified files (default).
|
||||
--no-keep-going Stop at the first error (default).
|
||||
--no-memory No additional memory tests (default).
|
||||
--no-quiet Print full ouput from components.
|
||||
--out-of-source-dir=<path> Directory used for CMake out-of-source build tests.
|
||||
--outcome-file=<path> File where test outcomes are written (not done if
|
||||
empty; default: \$MBEDTLS_TEST_OUTCOME_FILE).
|
||||
--random-seed Use a random seed value for randomized tests (default).
|
||||
-r|--release-test Run this script in release mode. This fixes the seed value to 1.
|
||||
-r|--release-test Run this script in release mode. This fixes the seed value to ${RELEASE_SEED}.
|
||||
-s|--seed Integer seed value to use for this test run.
|
||||
|
||||
Tool path options:
|
||||
|
@ -288,6 +312,11 @@ msg()
|
|||
else
|
||||
current_section="$1"
|
||||
fi
|
||||
|
||||
if [ $QUIET -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "******************************************************************"
|
||||
echo "* $current_section "
|
||||
|
@ -363,13 +392,15 @@ pre_parse_command_line () {
|
|||
--no-force) FORCE=0;;
|
||||
--no-keep-going) KEEP_GOING=0;;
|
||||
--no-memory) MEMORY=0;;
|
||||
--no-quiet) QUIET=0;;
|
||||
--openssl) shift; OPENSSL="$1";;
|
||||
--openssl-legacy) shift; OPENSSL_LEGACY="$1";;
|
||||
--openssl-next) shift; OPENSSL_NEXT="$1";;
|
||||
--outcome-file) shift; MBEDTLS_TEST_OUTCOME_FILE="$1";;
|
||||
--out-of-source-dir) shift; OUT_OF_SOURCE_DIR="$1";;
|
||||
--quiet|-q) QUIET=1;;
|
||||
--random-seed) unset SEED;;
|
||||
--release-test|-r) SEED=1;;
|
||||
--release-test|-r) SEED=$RELEASE_SEED;;
|
||||
--seed|-s) shift; SEED="$1";;
|
||||
-*)
|
||||
echo >&2 "Unknown option: $1"
|
||||
|
@ -449,7 +480,7 @@ pre_setup_keep_going () {
|
|||
failure_summary="$failure_summary
|
||||
$text"
|
||||
failure_count=$((failure_count + 1))
|
||||
echo "${start_red}^^^^$text^^^^${end_color}"
|
||||
echo "${start_red}^^^^$text^^^^${end_color}" >&2
|
||||
fi
|
||||
}
|
||||
make () {
|
||||
|
@ -495,6 +526,24 @@ not() {
|
|||
! "$@"
|
||||
}
|
||||
|
||||
pre_setup_quiet_redirect () {
|
||||
if [ $QUIET -ne 1 ]; then
|
||||
redirect_out () {
|
||||
"$@"
|
||||
}
|
||||
redirect_err () {
|
||||
"$@"
|
||||
}
|
||||
else
|
||||
redirect_out () {
|
||||
"$@" >/dev/null
|
||||
}
|
||||
redirect_err () {
|
||||
"$@" 2>/dev/null
|
||||
}
|
||||
fi
|
||||
}
|
||||
|
||||
pre_prepare_outcome_file () {
|
||||
case "$MBEDTLS_TEST_OUTCOME_FILE" in
|
||||
[!/]*) MBEDTLS_TEST_OUTCOME_FILE="$PWD/$MBEDTLS_TEST_OUTCOME_FILE";;
|
||||
|
@ -505,6 +554,10 @@ pre_prepare_outcome_file () {
|
|||
}
|
||||
|
||||
pre_print_configuration () {
|
||||
if [ $QUIET -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
msg "info: $0 configuration"
|
||||
echo "MEMORY: $MEMORY"
|
||||
echo "FORCE: $FORCE"
|
||||
|
@ -579,6 +632,11 @@ pre_check_tools () {
|
|||
"$ARMC6_CC" "$ARMC6_AR" "$ARMC6_FROMELF";;
|
||||
esac
|
||||
|
||||
# past this point, no call to check_tool, only printing output
|
||||
if [ $QUIET -eq 1 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
msg "info: output_env.sh"
|
||||
case $RUN_COMPONENTS in
|
||||
*_armcc*)
|
||||
|
@ -644,7 +702,13 @@ component_check_names () {
|
|||
|
||||
component_check_test_cases () {
|
||||
msg "Check: test case descriptions" # < 1s
|
||||
record_status tests/scripts/check-test-cases.py
|
||||
if [ $QUIET -eq 1 ]; then
|
||||
opt='--quiet'
|
||||
else
|
||||
opt=''
|
||||
fi
|
||||
record_status tests/scripts/check-test-cases.py $opt
|
||||
unset opt
|
||||
}
|
||||
|
||||
component_check_doxygen_warnings () {
|
||||
|
@ -1935,7 +1999,10 @@ component_check_python_files () {
|
|||
|
||||
component_check_generate_test_code () {
|
||||
msg "uint test: generate_test_code.py"
|
||||
record_status ./tests/scripts/test_generate_test_code.py
|
||||
# unittest writes out mundane stuff like number or tests run on stderr.
|
||||
# Our convention is to reserve stderr for actual errors, and write
|
||||
# harmless info on stdout so it can be suppress with --quiet.
|
||||
record_status ./tests/scripts/test_generate_test_code.py 2>&1
|
||||
}
|
||||
|
||||
################################################################
|
||||
|
@ -1966,13 +2033,18 @@ run_component () {
|
|||
# Unconditionally create a seedfile that's sufficiently long.
|
||||
# Do this before each component, because a previous component may
|
||||
# have messed it up or shortened it.
|
||||
dd if=/dev/urandom of=./tests/seedfile bs=64 count=1
|
||||
redirect_err dd if=/dev/urandom of=./tests/seedfile bs=64 count=1
|
||||
|
||||
# Run the component code.
|
||||
"$@"
|
||||
if [ $QUIET -eq 1 ]; then
|
||||
# msg() is silenced, so just print the component name here
|
||||
echo "${current_component#component_}"
|
||||
fi
|
||||
redirect_out "$@"
|
||||
|
||||
# Restore the build tree to a clean state.
|
||||
cleanup
|
||||
unset current_component
|
||||
}
|
||||
|
||||
# Preliminary setup
|
||||
|
@ -1990,6 +2062,7 @@ else
|
|||
"$@"
|
||||
}
|
||||
fi
|
||||
pre_setup_quiet_redirect
|
||||
pre_prepare_outcome_file
|
||||
pre_print_configuration
|
||||
pre_check_tools
|
||||
|
|
|
@ -2,9 +2,22 @@
|
|||
|
||||
# basic-build-tests.sh
|
||||
#
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2016, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
@ -43,6 +56,14 @@ fi
|
|||
: ${GNUTLS_LEGACY_CLI:="$GNUTLS_CLI"}
|
||||
: ${GNUTLS_LEGACY_SERV:="$GNUTLS_SERV"}
|
||||
|
||||
# Used to make ssl-opt.sh deterministic.
|
||||
#
|
||||
# See also RELEASE_SEED in all.sh. Debugging is easier if both values are kept
|
||||
# in sync. If you change the value here because it breaks some tests, you'll
|
||||
# definitely want to change it in all.sh as well.
|
||||
: ${SEED:=1}
|
||||
export SEED
|
||||
|
||||
# To avoid setting OpenSSL and GnuTLS for each call to compat.sh and ssl-opt.sh
|
||||
# we just export the variables they require
|
||||
export OPENSSL_CMD="$OPENSSL"
|
||||
|
@ -218,10 +239,12 @@ echo
|
|||
# Step 4e - Coverage
|
||||
echo "Coverage"
|
||||
|
||||
LINES_TESTED=$(tail -n3 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* lines)/\1/p')
|
||||
LINES_TOTAL=$(tail -n3 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) lines)/\1/p')
|
||||
FUNCS_TESTED=$(tail -n3 cov-$TEST_OUTPUT|sed -n -e 's/ functions..: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* functions)$/\1/p')
|
||||
FUNCS_TOTAL=$(tail -n3 cov-$TEST_OUTPUT|sed -n -e 's/ functions..: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) functions)$/\1/p')
|
||||
LINES_TESTED=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* lines)/\1/p')
|
||||
LINES_TOTAL=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ lines......: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) lines)/\1/p')
|
||||
FUNCS_TESTED=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ functions..: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* functions)$/\1/p')
|
||||
FUNCS_TOTAL=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ functions..: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) functions)$/\1/p')
|
||||
BRANCHES_TESTED=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ branches...: [0-9]*.[0-9]% (\([0-9]*\) of [0-9]* branches)$/\1/p')
|
||||
BRANCHES_TOTAL=$(tail -n4 cov-$TEST_OUTPUT|sed -n -e 's/ branches...: [0-9]*.[0-9]% ([0-9]* of \([0-9]*\) branches)$/\1/p')
|
||||
|
||||
LINES_PERCENT=$((1000*$LINES_TESTED/$LINES_TOTAL))
|
||||
LINES_PERCENT="$(($LINES_PERCENT/10)).$(($LINES_PERCENT-($LINES_PERCENT/10)*10))"
|
||||
|
@ -229,11 +252,14 @@ LINES_PERCENT="$(($LINES_PERCENT/10)).$(($LINES_PERCENT-($LINES_PERCENT/10)*10))
|
|||
FUNCS_PERCENT=$((1000*$FUNCS_TESTED/$FUNCS_TOTAL))
|
||||
FUNCS_PERCENT="$(($FUNCS_PERCENT/10)).$(($FUNCS_PERCENT-($FUNCS_PERCENT/10)*10))"
|
||||
|
||||
BRANCHES_PERCENT=$((1000*$BRANCHES_TESTED/$BRANCHES_TOTAL))
|
||||
BRANCHES_PERCENT="$(($BRANCHES_PERCENT/10)).$(($BRANCHES_PERCENT-($BRANCHES_PERCENT/10)*10))"
|
||||
|
||||
echo "Lines Tested : $LINES_TESTED of $LINES_TOTAL $LINES_PERCENT%"
|
||||
echo "Functions Tested : $FUNCS_TESTED of $FUNCS_TOTAL $FUNCS_PERCENT%"
|
||||
echo "Branches Tested : $BRANCHES_TESTED of $BRANCHES_TOTAL $BRANCHES_PERCENT%"
|
||||
echo
|
||||
|
||||
|
||||
rm unit-test-$TEST_OUTPUT
|
||||
rm sys-test-$TEST_OUTPUT
|
||||
rm compat-test-$TEST_OUTPUT
|
||||
|
|
|
@ -7,6 +7,23 @@
|
|||
# sed -e '/EXTRACT/s/YES/NO/' doxygen/mbedtls.doxyfile | doxygen -
|
||||
# but that would warn about any undocumented item, while our goal is to find
|
||||
# items that are documented, but not marked as such by mistake.
|
||||
#
|
||||
# Copyright (C) 2012-2016, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
|
|
@ -1,7 +1,21 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
# Copyright (c) 2018, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
"""
|
||||
This script checks the current state of the source code for minor issues,
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2018, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2015-2019, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
set -eu
|
||||
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
#! /usr/bin/env sh
|
||||
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2018, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose:
|
||||
#
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
# curves.pl
|
||||
#
|
||||
# Copyright (c) 2014-2016, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
# depends-hashes.pl
|
||||
#
|
||||
# Copyright (c) 2017, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
# depends-pkalgs.pl
|
||||
#
|
||||
# Copyright (c) 2017, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
|
@ -1,6 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Make sure the doxygen documentation builds without warnings
|
||||
#
|
||||
# Copyright (C) 2016, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
# Abort on errors (and uninitiliased variables)
|
||||
set -eu
|
||||
|
|
|
@ -3,6 +3,23 @@
|
|||
# Based on NIST CTR_DRBG.rsp validation file
|
||||
# Only uses AES-256-CTR cases that use a Derivation function
|
||||
# and concats nonce and personalization for initialization.
|
||||
#
|
||||
# Copyright (C) 2011, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use strict;
|
||||
|
||||
|
|
|
@ -2,6 +2,23 @@
|
|||
#
|
||||
# Based on NIST gcmDecryptxxx.rsp validation files
|
||||
# Only first 3 of every set used for compile time saving
|
||||
#
|
||||
# Copyright (C) 2012-2013, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use strict;
|
||||
|
||||
|
|
|
@ -2,6 +2,23 @@
|
|||
#
|
||||
# Based on NIST gcmEncryptIntIVxxx.rsp validation files
|
||||
# Only first 3 of every set used for compile time saving
|
||||
#
|
||||
# Copyright (C) 2012-2013, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use strict;
|
||||
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
#!/usr/bin/env perl
|
||||
#
|
||||
# Copyright (C) 2011-2015, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use strict;
|
||||
|
||||
|
|
|
@ -7,6 +7,23 @@
|
|||
# Usage: generate-afl-tests.sh <test data file path>
|
||||
# <test data file path> - should be the path to one of the test suite files
|
||||
# such as 'test_suite_mpi.data'
|
||||
#
|
||||
# Copyright (C) 2016, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
# Abort on errors
|
||||
set -e
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
# key-exchanges.pl
|
||||
#
|
||||
# Copyright (c) 2015-2017, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
#!/usr/bin/env perl
|
||||
#
|
||||
# Copyright (C) 2015-2019, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
|
|
@ -5,6 +5,23 @@
|
|||
# Outputs the line count of the file to stdout.
|
||||
#
|
||||
# Usage: list-identifiers.sh [ -i | --internal ]
|
||||
#
|
||||
# Copyright (C) 2015-2019, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
set -eu
|
||||
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2015-2019, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
set -eu
|
||||
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2015-2019, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
set -eu
|
||||
|
||||
|
|
|
@ -12,6 +12,23 @@ The build command is "make -DRECORD_PSA_STATUS_COVERAGE_LOG", which is
|
|||
only supported with make (as opposed to CMake or other build methods).
|
||||
"""
|
||||
|
||||
# Copyright (C) 2019, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import subprocess
|
||||
|
|
|
@ -7,6 +7,23 @@
|
|||
# an unbounded way, those functions should use interation instead.
|
||||
#
|
||||
# Typical usage: scripts/recursion.pl library/*.c
|
||||
#
|
||||
# Copyright (C) 2014-2015, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
|
|
@ -2,9 +2,22 @@
|
|||
|
||||
# run-test-suites.pl
|
||||
#
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2015-2018, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
|
|
|
@ -4,6 +4,23 @@
|
|||
# Usage: tcp_client.pl HOSTNAME PORT DATA1 RESPONSE1
|
||||
# DATA: hex-encoded data to send to the server
|
||||
# RESPONSE: regexp that must match the server's response
|
||||
#
|
||||
# Copyright (C) 2017, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
|
|
@ -2,9 +2,22 @@
|
|||
|
||||
# test-ref-configs.pl
|
||||
#
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2013-2016, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
|
@ -7,6 +7,23 @@ Return 0 if all test cases pass, 1 if the output was not always as expected,
|
|||
or 1 (with a Python backtrace) if there was an operational error.
|
||||
"""
|
||||
|
||||
# Copyright (C) 2018-2020, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
|
||||
import argparse
|
||||
from collections import namedtuple
|
||||
import itertools
|
||||
|
|
|
@ -1,8 +1,21 @@
|
|||
# test_zeroize.gdb
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2018, Arm Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
@ -31,19 +44,13 @@
|
|||
# the compiler potentially has a bug.
|
||||
#
|
||||
# Note: This test requires that the test program is compiled with -g3.
|
||||
#
|
||||
# WARNING: There does not seem to be a mechanism in GDB scripts to set a
|
||||
# breakpoint at the end of a function (probably because there are a lot of
|
||||
# complications as function can have multiple exit points, etc). Therefore, it
|
||||
# was necessary to hard-code the line number of the breakpoint in the zeroize.c
|
||||
# test app. The assumption is that zeroize.c is a simple test app that does not
|
||||
# change often (as opposed to the actual library code), so the breakpoint line
|
||||
# number does not need to be updated often.
|
||||
|
||||
set confirm off
|
||||
|
||||
file ./programs/test/zeroize
|
||||
break zeroize.c:100
|
||||
|
||||
search GDB_BREAK_HERE
|
||||
break $_
|
||||
|
||||
set args ./programs/test/zeroize.c
|
||||
run
|
||||
|
|
|
@ -2,9 +2,22 @@
|
|||
|
||||
# travis-log-failure.sh
|
||||
#
|
||||
# This file is part of mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Copyright (c) 2016, ARM Limited, All Rights Reserved
|
||||
# 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.
|
||||
#
|
||||
# This file is part of Mbed TLS (https://tls.mbed.org)
|
||||
#
|
||||
# Purpose
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue