Skip to content

Commit 7053083

Browse files
authored
Merge pull request #45 from ceolin/mbedtls-3.4.1
Update to mbedTLS 3.4.1
2 parents c38dc78 + 944e838 commit 7053083

File tree

279 files changed

+4651
-2530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

279 files changed

+4651
-2530
lines changed

.readthedocs.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-20.04
11+
tools:
12+
python: "3.9"
13+
jobs:
14+
pre_build:
15+
- make apidoc
16+
- breathe-apidoc -o docs/api apidoc/xml
17+
18+
# Build documentation in the docs/ directory with Sphinx
19+
sphinx:
20+
builder: dirhtml
21+
configuration: docs/conf.py
22+
23+
# Optionally declare the Python requirements required to build your docs
24+
python:
25+
install:
26+
- requirements: docs/requirements.txt

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ if(NOT DISABLE_PACKAGE_CONFIG_AND_INSTALL)
356356
write_basic_package_version_file(
357357
"cmake/MbedTLSConfigVersion.cmake"
358358
COMPATIBILITY SameMajorVersion
359-
VERSION 3.4.0)
359+
VERSION 3.4.1)
360360

361361
install(
362362
FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake/MbedTLSConfig.cmake"

ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
Mbed TLS ChangeLog (Sorted per branch, date)
22

3+
= Mbed TLS 3.4.1 branch released 2023-08-04
4+
5+
Bugfix
6+
* Fix builds on Windows with clang
7+
8+
Changes
9+
* Update test data to avoid failures of unit tests after 2023-08-07.
10+
311
= Mbed TLS 3.4.0 branch released 2023-03-28
412

513
Default behavior changes

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
*.html
22
*.pdf
3+
_build/
4+
api/

docs/Makefile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help clean apidoc breathe_apidoc Makefile
16+
17+
# Intercept the 'clean' target so we can do the right thing for apidoc as well
18+
clean:
19+
@# Clean the apidoc
20+
$(MAKE) -C .. apidoc_clean
21+
@# Clean the breathe-apidoc generated files
22+
rm -rf ./api
23+
@# Clean the sphinx docs
24+
@$(SPHINXBUILD) -M clean "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
25+
26+
apidoc:
27+
@# Generate doxygen from source using the main Makefile
28+
$(MAKE) -C .. apidoc
29+
30+
breathe_apidoc: apidoc
31+
@# Remove existing files - breathe-apidoc skips them if they're present
32+
rm -rf ./api
33+
@# Generate RST file structure with breathe-apidoc
34+
breathe-apidoc -o ./api ../apidoc/xml
35+
36+
# Catch-all target: route all unknown targets to Sphinx using the new
37+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
38+
%: Makefile breathe_apidoc
39+
@# Build the relevant target with sphinx
40+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/conf.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
import glob
9+
10+
project = 'Mbed TLS Versioned'
11+
copyright = '2023, Mbed TLS Contributors'
12+
author = 'Mbed TLS Contributors'
13+
14+
# -- General configuration ---------------------------------------------------
15+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
16+
17+
extensions = ['breathe', 'sphinx.ext.graphviz']
18+
19+
templates_path = ['_templates']
20+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
21+
22+
breathe_projects = {
23+
'mbedtls-versioned': '../apidoc/xml'
24+
}
25+
breathe_default_project = 'mbedtls-versioned'
26+
27+
primary_domain = 'c'
28+
highlight_language = 'c'
29+
30+
# -- Options for HTML output -------------------------------------------------
31+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
32+
33+
html_theme = 'sphinx_rtd_theme'
34+
html_static_path = ['_static']

docs/index.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.. Mbed TLS Versioned documentation master file, created by
2+
sphinx-quickstart on Thu Feb 23 18:13:44 2023.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
Mbed TLS API documentation
7+
==========================
8+
9+
.. doxygenpage:: index
10+
:project: mbedtls-versioned
11+
12+
.. toctree::
13+
:caption: Contents
14+
:maxdepth: 1
15+
16+
Home <self>
17+
api/grouplist.rst
18+
api/filelist.rst
19+
api/structlist.rst
20+
api/unionlist.rst

docs/requirements.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
sphinx-rtd-theme
2+
breathe

docs/requirements.txt

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#
2+
# This file is autogenerated by pip-compile with Python 3.9
3+
# by the following command:
4+
#
5+
# pip-compile requirements.in
6+
#
7+
alabaster==0.7.13
8+
# via sphinx
9+
babel==2.12.1
10+
# via sphinx
11+
breathe==4.35.0
12+
# via -r requirements.in
13+
certifi==2022.12.7
14+
# via requests
15+
charset-normalizer==3.1.0
16+
# via requests
17+
docutils==0.17.1
18+
# via
19+
# breathe
20+
# sphinx
21+
# sphinx-rtd-theme
22+
idna==3.4
23+
# via requests
24+
imagesize==1.4.1
25+
# via sphinx
26+
importlib-metadata==6.0.0
27+
# via sphinx
28+
jinja2==3.1.2
29+
# via sphinx
30+
markupsafe==2.1.2
31+
# via jinja2
32+
packaging==23.0
33+
# via sphinx
34+
pygments==2.14.0
35+
# via sphinx
36+
requests==2.28.2
37+
# via sphinx
38+
snowballstemmer==2.2.0
39+
# via sphinx
40+
sphinx==4.5.0
41+
# via
42+
# breathe
43+
# sphinx-rtd-theme
44+
sphinx-rtd-theme==1.2.0
45+
# via -r requirements.in
46+
sphinxcontrib-applehelp==1.0.4
47+
# via sphinx
48+
sphinxcontrib-devhelp==1.0.2
49+
# via sphinx
50+
sphinxcontrib-htmlhelp==2.0.1
51+
# via sphinx
52+
sphinxcontrib-jquery==2.0.0
53+
# via sphinx-rtd-theme
54+
sphinxcontrib-jsmath==1.0.1
55+
# via sphinx
56+
sphinxcontrib-qthelp==1.0.3
57+
# via sphinx
58+
sphinxcontrib-serializinghtml==1.1.5
59+
# via sphinx
60+
urllib3==1.26.15
61+
# via requests
62+
zipp==3.15.0
63+
# via importlib-metadata
64+
65+
# The following packages are considered to be unsafe in a requirements file:
66+
# setuptools

doxygen/input/doc_mainpage.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323

2424
/**
25-
* @mainpage mbed TLS v3.4.0 source code documentation
25+
* @mainpage mbed TLS v3.4.1 source code documentation
2626
*
2727
* This documentation describes the internal structure of mbed TLS. It was
2828
* automatically generated from specially formatted comment blocks in

doxygen/mbedtls.doxyfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PROJECT_NAME = "mbed TLS v3.4.0"
1+
PROJECT_NAME = "mbed TLS v3.4.1"
22
OUTPUT_DIRECTORY = ../apidoc/
33
FULL_PATH_NAMES = NO
44
OPTIMIZE_OUTPUT_FOR_C = YES
@@ -18,6 +18,7 @@ HTML_OUTPUT = .
1818
HTML_TIMESTAMP = YES
1919
SEARCHENGINE = YES
2020
GENERATE_LATEX = NO
21+
GENERATE_XML = YES
2122
MACRO_EXPANSION = YES
2223
EXPAND_ONLY_PREDEF = YES
2324
INCLUDE_PATH = ../include
@@ -42,3 +43,12 @@ DOT_TRANSPARENT = YES
4243
# \retval #PSA_ERROR_INSUFFICIENT_MEMORY \emptydescription
4344
# This avoids writing redundant text and keeps Clang happy.
4445
ALIASES += emptydescription=""
46+
47+
# Define away Mbed TLS macros that make parsing definitions difficult.
48+
# MBEDTLS_DEPRECATED is not included in this list as it's important to
49+
# display deprecated status in the documentation.
50+
PREDEFINED = "MBEDTLS_CHECK_RETURN_CRITICAL=" \
51+
"MBEDTLS_CHECK_RETURN_TYPICAL=" \
52+
"MBEDTLS_CHECK_RETURN_OPTIONAL=" \
53+
"MBEDTLS_PRINTF_ATTRIBUTE(a,b)=" \
54+

include/mbedtls/bignum.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,7 @@ int mbedtls_mpi_inv_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
10051005
* This must point to an initialized MPI.
10061006
* \param rounds The number of bases to perform the Miller-Rabin primality
10071007
* test for. The probability of returning 0 on a composite is
1008-
* at most 2<sup>-2*\p rounds</sup>.
1008+
* at most 2<sup>-2*\p rounds </sup>.
10091009
* \param f_rng The RNG function to use. This must not be \c NULL.
10101010
* \param p_rng The RNG parameter to be passed to \p f_rng.
10111011
* This may be \c NULL if \p f_rng doesn't use

include/mbedtls/build_info.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@
3838
*/
3939
#define MBEDTLS_VERSION_MAJOR 3
4040
#define MBEDTLS_VERSION_MINOR 4
41-
#define MBEDTLS_VERSION_PATCH 0
41+
#define MBEDTLS_VERSION_PATCH 1
4242

4343
/**
4444
* The single version number has the following structure:
4545
* MMNNPP00
4646
* Major version | Minor version | Patch version
4747
*/
48-
#define MBEDTLS_VERSION_NUMBER 0x03040000
49-
#define MBEDTLS_VERSION_STRING "3.4.0"
50-
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 3.4.0"
48+
#define MBEDTLS_VERSION_NUMBER 0x03040100
49+
#define MBEDTLS_VERSION_STRING "3.4.1"
50+
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 3.4.1"
5151

5252
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
5353
#define _CRT_SECURE_NO_DEPRECATE 1

library/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -284,19 +284,19 @@ endif(USE_STATIC_MBEDTLS_LIBRARY)
284284
if(USE_SHARED_MBEDTLS_LIBRARY)
285285
set(CMAKE_LIBRARY_PATH ${CMAKE_CURRENT_BINARY_DIR})
286286
add_library(${mbedcrypto_target} SHARED ${src_crypto})
287-
set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 3.4.0 SOVERSION 14)
287+
set_target_properties(${mbedcrypto_target} PROPERTIES VERSION 3.4.1 SOVERSION 14)
288288
target_link_libraries(${mbedcrypto_target} PUBLIC ${libs})
289289

290290
if(TARGET everest)
291291
target_link_libraries(${mbedcrypto_target} PUBLIC everest)
292292
endif()
293293

294294
add_library(${mbedx509_target} SHARED ${src_x509})
295-
set_target_properties(${mbedx509_target} PROPERTIES VERSION 3.4.0 SOVERSION 5)
295+
set_target_properties(${mbedx509_target} PROPERTIES VERSION 3.4.1 SOVERSION 5)
296296
target_link_libraries(${mbedx509_target} PUBLIC ${libs} ${mbedcrypto_target})
297297

298298
add_library(${mbedtls_target} SHARED ${src_tls})
299-
set_target_properties(${mbedtls_target} PROPERTIES VERSION 3.4.0 SOVERSION 19)
299+
set_target_properties(${mbedtls_target} PROPERTIES VERSION 3.4.1 SOVERSION 19)
300300
target_link_libraries(${mbedtls_target} PUBLIC ${libs} ${mbedx509_target})
301301
endif(USE_SHARED_MBEDTLS_LIBRARY)
302302

library/aesni.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
#if MBEDTLS_AESNI_HAVE_CODE == 2
3636
#if !defined(_WIN32)
3737
#include <cpuid.h>
38+
#else
39+
#include <intrin.h>
3840
#endif
3941
#include <immintrin.h>
4042
#endif

0 commit comments

Comments
 (0)