Skip to content

Commit

Permalink
Updated mbedTLS to 3.6.2 (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsinsane authored Dec 6, 2024
1 parent 9d22801 commit 416c3cf
Show file tree
Hide file tree
Showing 1,598 changed files with 456,809 additions and 178,791 deletions.
2 changes: 2 additions & 0 deletions contrib/mbedtls/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Classify all '.function' files as C for syntax highlighting purposes
*.function linguist-language=C
58 changes: 54 additions & 4 deletions contrib/mbedtls/.gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,75 @@
# Random seed file created by test scripts and sample programs
seedfile
# MBEDTLS_PSA_INJECT_ENTROPY seed file created by the test framework
00000000ffffff52.psa_its
# Log files created by all.sh to reduce the logs in case a component runs
# successfully
quiet-make.*

# CMake build artifacts:
CMakeCache.txt
CMakeFiles
CTestTestfile.cmake
cmake_install.cmake
Testing
# CMake generates *.dir/ folders for in-tree builds (used by MSVC projects), ignore all of those:
*.dir/
# MSVC files generated by CMake:
/*.sln
/*.vcxproj
/*.filters

# Test coverage build artifacts:
Coverage
*.gcno
*.gcda
coverage-summary.txt

# generated by scripts/memory.sh
massif-*

# MSVC files generated by CMake:
/*.sln
/*.vcxproj
/*.filters
# Eclipse project files
.cproject
.project
/.settings

# Unix-like build artifacts:
*.o

# MSVC build artifacts:
*.exe
*.pdb
*.ilk
*.lib

# Python build artifacts:
*.pyc

# CMake generates *.dir/ folders for in-tree builds (used by MSVC projects), ignore all of those:
*.dir/

# Microsoft CMake extension for Visual Studio Code generates a build directory by default
/build/

# Generated documentation:
/apidoc

# PSA Crypto compliance test repo, cloned by test_psa_compliance.py
/psa-arch-tests

# Editor navigation files:
/GPATH
/GRTAGS
/GSYMS
/GTAGS
/TAGS
/cscope*.out
/tags

# clangd compilation database
compile_commands.json
# clangd index files
/.cache/clangd/index/

# VScode folder to store local debug files and configurations
.vscode
3 changes: 3 additions & 0 deletions contrib/mbedtls/.gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "framework"]
path = framework
url = https://github.com/Mbed-TLS/mbedtls-framework
3 changes: 3 additions & 0 deletions contrib/mbedtls/.globalrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
default:\
:langmap=c\:.c.h.function:\

4 changes: 4 additions & 0 deletions contrib/mbedtls/.mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[mypy]
mypy_path = scripts
namespace_packages = True
warn_unused_configs = True
80 changes: 80 additions & 0 deletions contrib/mbedtls/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
[MASTER]
init-hook='import sys; sys.path.append("scripts")'
min-similarity-lines=10

[BASIC]
# We're ok with short funtion argument names.
# [invalid-name]
argument-rgx=[a-z_][a-z0-9_]*$

# Allow filter and map.
# [bad-builtin]
bad-functions=input

# We prefer docstrings, but we don't require them on all functions.
# Require them only on long functions (for some value of long).
# [missing-docstring]
docstring-min-length=10

# No upper limit on method names. Pylint <2.1.0 has an upper limit of 30.
# [invalid-name]
method-rgx=[a-z_][a-z0-9_]{2,}$

# Allow module names containing a dash (but no underscore or uppercase letter).
# They are whole programs, not meant to be included by another module.
# [invalid-name]
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|[a-z][-0-9a-z]+)$

# Some functions don't need docstrings.
# [missing-docstring]
no-docstring-rgx=(run_)?main$

# We're ok with short local or global variable names.
# [invalid-name]
variable-rgx=[a-z_][a-z0-9_]*$

[DESIGN]
# Allow more than the default 7 attributes.
# [too-many-instance-attributes]
max-attributes=15

[FORMAT]
# Allow longer modules than the default recommended maximum.
# [too-many-lines]
max-module-lines=2000

[MESSAGES CONTROL]
# * locally-disabled, locally-enabled: If we disable or enable a message
# locally, it's by design. There's no need to clutter the Pylint output
# with this information.
# * logging-format-interpolation: Pylint warns about things like
# ``log.info('...'.format(...))``. It insists on ``log.info('...', ...)``.
# This is of minor utility (mainly a performance gain when there are
# many messages that use formatting and are below the log level).
# Some versions of Pylint (including 1.8, which is the version on
# Ubuntu 18.04) only recognize old-style format strings using '%',
# and complain about something like ``log.info('{}', foo)`` with
# logging-too-many-args (Pylint supports new-style formatting if
# declared globally with logging_format_style under [LOGGING] but
# this requires Pylint >=2.2).
# * no-else-return: Allow the perfectly reasonable idiom
# if condition1:
# return value1
# else:
# return value2
# * unnecessary-pass: If we take the trouble of adding a line with "pass",
# it's because we think the code is clearer that way.
disable=locally-disabled,locally-enabled,logging-format-interpolation,no-else-return,unnecessary-pass

[REPORTS]
# Don't diplay statistics. Just the facts.
reports=no

[VARIABLES]
# Allow unused variables if their name starts with an underscore.
# [unused-argument]
dummy-variables-rgx=_.*

[SIMILARITIES]
# Ignore imports when computing similarities.
ignore-imports=yes
37 changes: 37 additions & 0 deletions contrib/mbedtls/.readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Include the framework submodule in the build
submodules:
include:
- framework

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"
jobs:
pre_build:
- ./scripts/apidoc_full.sh
- breathe-apidoc -o docs/api apidoc/xml
post_build:
- |
# Work around Readthedocs bug: Command parsing fails if the 'if' statement is on the first line
if [ "$READTHEDOCS_VERSION" = "development" ]; then
"$READTHEDOCS_VIRTUALENV_PATH/bin/rtd" projects "Mbed TLS API" redirects sync --wet-run -f docs/redirects.yaml
fi
# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: dirhtml
configuration: docs/conf.py

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: docs/requirements.txt
40 changes: 18 additions & 22 deletions contrib/mbedtls/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,28 @@
language: c
compiler:
- clang
- gcc
sudo: false
# Declare python as our language. This way we get our chosen Python version,
# and pip is available. Gcc and clang are available anyway.
dist: jammy
os: linux
language: python
python: 3.10

cache: ccache
script:
- tests/scripts/recursion.pl library/*.c
- tests/scripts/check-generated-files.sh
- tests/scripts/check-doxy-blocks.pl
- tests/scripts/check-names.sh
- cmake -D CMAKE_BUILD_TYPE:String="Check" .
- make
- make test
- programs/test/selftest
- OSSL_NO_DTLS=1 tests/compat.sh
- tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
- tests/scripts/test-ref-configs.pl
- tests/scripts/curves.pl
- tests/scripts/key-exchanges.pl

branches:
only:
coverity_scan

install:
- $PYTHON scripts/min_requirements.py

env:
global:
secure: "barHldniAfXyoWOD/vcO+E6/Xm4fmcaUoC9BeKW+LwsHqlDMLvugaJnmLXkSpkbYhVL61Hzf3bo0KPJn88AFc5Rkf8oYHPjH4adMnVXkf3B9ghHCgznqHsAH3choo6tnPxaFgOwOYmLGb382nQxfE5lUdvnM/W/psQjWt66A1+k="

- SEED=1
- secure: "GF/Fde5fkm15T/RNykrjrPV5Uh1KJ70cP308igL6Xkk3eJmqkkmWCe9JqRH12J3TeWw2fu9PYPHt6iFSg6jasgqysfUyg+W03knRT5QNn3h5eHgt36cQJiJr6t3whPrRaiM6U9omE0evm+c0cAwlkA3GGSMw8Z+na4EnKI6OFCo="
addons:
coverity_scan:
project:
name: "ARMmbed/mbedtls"
notification_email: [email protected]
notification_email: [email protected]
build_command_prepend:
build_command: make
branch_pattern: coverity_scan
Loading

0 comments on commit 416c3cf

Please sign in to comment.