Merge pull request #140 from yanesca/everest_integration
Everest integration
This commit is contained in:
commit
f0716542c4
92 changed files with 4457 additions and 217 deletions
|
@ -618,6 +618,17 @@ component_test_new_ecdh_context () {
|
|||
make test
|
||||
}
|
||||
|
||||
component_test_everest () {
|
||||
msg "build: Everest ECDH context (ASan build)" # ~ 6 min
|
||||
scripts/config.pl unset MBEDTLS_ECDH_LEGACY_CONTEXT
|
||||
scripts/config.pl set MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
|
||||
CC=clang cmake -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
msg "test: Everest ECDH context - main suites (inc. selftests) (ASan build)" # ~ 50s
|
||||
make test
|
||||
}
|
||||
|
||||
component_test_full_cmake_clang () {
|
||||
msg "build: cmake, full config, clang" # ~ 50s
|
||||
scripts/config.pl full
|
||||
|
@ -904,6 +915,19 @@ support_test_m32_o1 () {
|
|||
support_test_m32_o0 "$@"
|
||||
}
|
||||
|
||||
component_test_m32_everest () {
|
||||
msg "build: i386, Everest ECDH context (ASan build)" # ~ 6 min
|
||||
scripts/config.pl unset MBEDTLS_ECDH_LEGACY_CONTEXT
|
||||
scripts/config.pl set MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
|
||||
make CC=gcc CFLAGS='-O2 -Werror -Wall -Wextra -m32 -fsanitize=address'
|
||||
|
||||
msg "test: i386, Everest ECDH context - main suites (inc. selftests) (ASan build)" # ~ 50s
|
||||
make test
|
||||
}
|
||||
support_test_m32_everest () {
|
||||
support_test_m32_o0 "$@"
|
||||
}
|
||||
|
||||
component_test_mx32 () {
|
||||
msg "build: 64-bit ILP32, make, gcc" # ~ 30s
|
||||
scripts/config.pl full
|
||||
|
|
|
@ -144,6 +144,7 @@ class TabIssueTracker(LineIssueTracker):
|
|||
heading = "Tabs present:"
|
||||
files_exemptions = frozenset([
|
||||
"Makefile",
|
||||
"Makefile.inc",
|
||||
"generate_visualc_files.pl",
|
||||
])
|
||||
|
||||
|
@ -181,7 +182,7 @@ class IntegrityChecker(object):
|
|||
self.setup_logger(log_file)
|
||||
self.files_to_check = (
|
||||
".c", ".h", ".sh", ".pl", ".py", ".md", ".function", ".data",
|
||||
"Makefile", "CMakeLists.txt", "ChangeLog"
|
||||
"Makefile", "Makefile.inc", "CMakeLists.txt", "ChangeLog"
|
||||
)
|
||||
self.excluded_directories = ['.git', 'mbed-os']
|
||||
self.excluded_paths = list(map(os.path.normpath, [
|
||||
|
|
|
@ -85,10 +85,12 @@ done
|
|||
printf "Likely typos: "
|
||||
sort -u actual-macros enum-consts > _caps
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
|
||||
LIBRARY="$( ls library/*.c ) 3rdparty/everest/library/everest.c 3rdparty/everest/library/x25519.c"
|
||||
NL='
|
||||
'
|
||||
sed -n 's/MBED..._[A-Z0-9_]*/\'"$NL"'&\'"$NL"/gp \
|
||||
$HEADERS library/*.c \
|
||||
$HEADERS $LIBRARY \
|
||||
| grep MBEDTLS | sort -u > _MBEDTLS_XXX
|
||||
TYPOS=$( diff _caps _MBEDTLS_XXX | sed -n 's/^> //p' \
|
||||
| egrep -v 'XXX|__|_$|^MBEDTLS_.*CONFIG_FILE$' || true )
|
||||
|
|
|
@ -9,6 +9,9 @@ use open qw(:std utf8);
|
|||
-d 'include/mbedtls' or die "$0: must be run from root\n";
|
||||
|
||||
@ARGV = grep { ! /compat-1\.3\.h/ } <include/mbedtls/*.h>;
|
||||
push @ARGV, "3rdparty/everest/include/everest/everest.h";
|
||||
push @ARGV, "3rdparty/everest/include/everest/x25519.h";
|
||||
|
||||
|
||||
my @consts;
|
||||
my $state = 'out';
|
||||
|
@ -22,7 +25,7 @@ while (<>)
|
|||
$state = 'in';
|
||||
} elsif( $state eq 'in' and /}/ ) {
|
||||
$state = 'out';
|
||||
} elsif( $state eq 'in' ) {
|
||||
} elsif( $state eq 'in' and not /^#/) {
|
||||
s/=.*//; s!/\*.*!!; s/,.*//; s/\s+//g; chomp;
|
||||
push @consts, $_ if $_;
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ then
|
|||
HEADERS=$( ls include/mbedtls/*_internal.h library/*.h | egrep -v 'compat-1\.3\.h|bn_mul' )
|
||||
else
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h library/*.h | egrep -v 'compat-1\.3\.h|bn_mul' )
|
||||
HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
|
||||
fi
|
||||
|
||||
rm -f identifiers
|
||||
|
|
|
@ -8,6 +8,7 @@ if [ -d include/mbedtls ]; then :; else
|
|||
fi
|
||||
|
||||
HEADERS=$( ls include/mbedtls/*.h include/psa/*.h | egrep -v 'compat-1\.3\.h' )
|
||||
HEADERS="$HEADERS 3rdparty/everest/include/everest/everest.h 3rdparty/everest/include/everest/x25519.h"
|
||||
|
||||
# White-list macros we want to be able to refer to that don't exist in the
|
||||
# crypto library, useful when referring to macros in Mbed TLS from comments.
|
||||
|
|
|
@ -30,9 +30,9 @@ if [ -n "$make_ret" ]; then
|
|||
fi
|
||||
|
||||
if uname | grep -F Darwin >/dev/null; then
|
||||
nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p'
|
||||
nm -gUj library/libmbed*.a 2>/dev/null | sed -n -e 's/^_//p' | grep -v -e ^FStar -e ^Hacl
|
||||
elif uname | grep -F Linux >/dev/null; then
|
||||
nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //'
|
||||
nm -og library/libmbed*.a | grep -v '^[^ ]*: *U \|^$\|^[^ ]*:$' | sed 's/^[^ ]* . //' | grep -v -e ^FStar -e ^Hacl
|
||||
fi | sort > exported-symbols
|
||||
make clean
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue