-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #343 from fortanix/yx/upgrade_vendor_mbedtls
- Upgrade vendor `mbedtls` code version to `0.28.7`. - Bump `mbedtls-sys-auto` code version to `0.28.7`. - Add a script to automate vendor code update process, see fe68f9c. - Save all patches we made to vendor code, see fe68f9c.
- Loading branch information
Showing
752 changed files
with
11,440 additions
and
11,440 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "mbedtls-sys-auto" | ||
version = "2.28.4+mbedtls-2.28.3" | ||
version = "2.28.7" | ||
authors = ["Jethro Beekman <[email protected]>"] | ||
build = "build/build.rs" | ||
license = "Apache-2.0 OR GPL-2.0-or-later" | ||
|
@@ -15,8 +15,8 @@ links = "mbedtls" | |
|
||
[package.metadata.mbedtls] | ||
git = "https://github.com/Mbed-TLS/mbedtls.git" | ||
version = "2.28.3" | ||
rev = "981743de6fcdbe672e482b6fd724d31d0a0d2476" | ||
version = "2.28.7" | ||
rev = "555f84735aecdbd76a566cf087ec8425dfb0c8ab" | ||
|
||
[lib] | ||
name = "mbedtls_sys" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
From cf13aecfd2270d83b0f466e8d967be95a3923e26 Mon Sep 17 00:00:00 2001 | ||
From: Vardhan Thigle <[email protected]> | ||
Date: Fri, 25 Jan 2019 11:31:35 +0530 | ||
Subject: [PATCH 1/2] Vendor Change:- | ||
|
||
1. Added conditional compilation flags "MBEDTLS_FORCE_AESNI" and "MBEDTLS_FORCE_PADLOCK" | ||
2. This allows us to supress cpuid based feature detection on sgx platforms. | ||
3. "MBEDTLS_FORCE_AESNI" gets set if "force_aesni_support" flag is enabled. | ||
4. Please refer to the previous commit for rust side changes. | ||
|
||
(cherry picked from commit d2317b0864e313d759671068e3d3aa52c8fab234) | ||
--- | ||
mbedtls-sys/vendor/library/aesni.c | 2 ++ | ||
mbedtls-sys/vendor/library/padlock.c | 2 ++ | ||
2 files changed, 4 insertions(+) | ||
|
||
diff --git a/mbedtls-sys/vendor/library/aesni.c b/mbedtls-sys/vendor/library/aesni.c | ||
index c909f654..b8f8e071 100644 | ||
--- a/mbedtls-sys/vendor/library/aesni.c | ||
+++ b/mbedtls-sys/vendor/library/aesni.c | ||
@@ -45,6 +45,7 @@ | ||
#include <immintrin.h> | ||
#endif | ||
|
||
+#if !defined(MBEDTLS_CUSTOM_HAS_AESNI) | ||
/* | ||
* AES-NI support detection routine | ||
*/ | ||
@@ -74,6 +75,7 @@ int mbedtls_aesni_has_support(unsigned int what) | ||
|
||
return (c & what) != 0; | ||
} | ||
+#endif | ||
|
||
#if MBEDTLS_AESNI_HAVE_CODE == 2 | ||
|
||
diff --git a/mbedtls-sys/vendor/library/padlock.c b/mbedtls-sys/vendor/library/padlock.c | ||
index 303f82c7..798e9b7c 100644 | ||
--- a/mbedtls-sys/vendor/library/padlock.c | ||
+++ b/mbedtls-sys/vendor/library/padlock.c | ||
@@ -39,6 +39,7 @@ | ||
|
||
#if defined(MBEDTLS_HAVE_X86) | ||
|
||
+#if !defined(MBEDTLS_CUSTOM_HAS_PADLOCK) | ||
/* | ||
* PadLock detection routine | ||
*/ | ||
@@ -68,6 +69,7 @@ int mbedtls_padlock_has_support(int feature) | ||
|
||
return flags & feature; | ||
} | ||
+#endif | ||
|
||
/* | ||
* PadLock AES-ECB block en(de)cryption | ||
-- | ||
2.25.1 | ||
|
35 changes: 35 additions & 0 deletions
35
mbedtls-sys/vendor-patches/0002-Adding-mpi_force_c_code-feature.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 044be6ae4f75c915b44a085e5943a65a22b3414a Mon Sep 17 00:00:00 2001 | ||
From: Raoul Strackx <[email protected]> | ||
Date: Tue, 10 Mar 2020 16:51:47 +0100 | ||
Subject: [PATCH 2/2] Adding mpi_force_c_code feature | ||
|
||
(cherry picked from commit 38522c212a441cb0c58b1ae6be6f2f43e3affb99) | ||
--- | ||
mbedtls-sys/vendor/include/mbedtls/bn_mul.h | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/mbedtls-sys/vendor/include/mbedtls/bn_mul.h b/mbedtls-sys/vendor/include/mbedtls/bn_mul.h | ||
index a0bc4d06..103e62a6 100644 | ||
--- a/mbedtls-sys/vendor/include/mbedtls/bn_mul.h | ||
+++ b/mbedtls-sys/vendor/include/mbedtls/bn_mul.h | ||
@@ -85,7 +85,7 @@ | ||
#endif /* bits in mbedtls_mpi_uint */ | ||
|
||
/* *INDENT-OFF* */ | ||
-#if defined(MBEDTLS_HAVE_ASM) | ||
+#if defined(MBEDTLS_HAVE_ASM) && !defined(MBEDTLS_MPI_FORCE_C_CODE) | ||
|
||
#ifndef asm | ||
#define asm __asm | ||
@@ -953,7 +953,7 @@ | ||
#endif /* SSE2 */ | ||
#endif /* MSVC */ | ||
|
||
-#endif /* MBEDTLS_HAVE_ASM */ | ||
+#endif /* MBEDTLS_HAVE_ASM && !MBEDTLS_MPI_FORCE_C_CODE */ | ||
|
||
#if !defined(MULADDC_CORE) | ||
#if defined(MBEDTLS_HAVE_UDBL) | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# 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 | ||
|
||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
*.o | ||
Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.