Ports/mbedtls: Update to Mbed TLS 3.1.0

This commit is contained in:
Tim Schumacher 2022-06-24 22:32:35 +02:00 committed by Linus Groh
parent 3c43ac9eb5
commit c0a7ac53cb
Notes: sideshowbarker 2024-07-17 09:58:44 +09:00
5 changed files with 8 additions and 77 deletions

View file

@ -138,7 +138,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n
| [`make`](make/) | GNU make | 4.3 | https://www.gnu.org/software/make/ |
| [`mandoc`](mandoc/) | mandoc | 1.14.5 | https://mandoc.bsd.lv/ |
| [`mawk`](mawk/) | mawk | 1.3.4-20200120 | https://invisible-island.net/mawk/ |
| [`mbedtls`](mbedtls/) | Mbed TLS | 2.16.2 | https://tls.mbed.org/ |
| [`mbedtls`](mbedtls/) | Mbed TLS | 3.1.0 | https://tls.mbed.org/ |
| [`mc`](mc/) | Midnight Commander | 4.8.28 | https://midnight-commander.org/ |
| [`mgba`](mgba/) | Game Boy, Game Boy Color and Game Boy Advance emulator | 0.9.3 | https://mgba.io/ |
| [`milkytracker`](milkytracker/) | milkytracker | 1.03.00 | https://github.com/milkytracker/MilkyTracker |

View file

@ -1,13 +1,12 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=mbedtls
version=2.16.2
files="https://tls.mbed.org/download/mbedtls-${version}-apache.tgz mbedtls-${version}-apache.tgz a6834fcd7b7e64b83dfaaa6ee695198cb5019a929b2806cb0162e049f98206a4"
makeopts=("CFLAGS=-DPLATFORM_UTIL_USE_GMTIME")
auth_type=sha256
port='mbedtls'
version='3.1.0'
files="https://github.com/Mbed-TLS/mbedtls/archive/refs/tags/v${version}.tar.gz mbedtls-${version}.tgz b02df6f68dd1537e115a8497d5c173dc71edc55ad084756e57a30f951b725acd"
makeopts=(
"SHARED=1"
)
auth_type='sha256'
install() {
run make DESTDIR="${SERENITY_INSTALL_ROOT}/usr/local" "${installopts[@]}" install
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmbedcrypto.so -Wl,-soname,libmbedcrypto.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmbedcrypto.a -Wl,--no-whole-archive
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmbedx509.so -Wl,-soname,libmbedx509.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmbedx509.a -Wl,--no-whole-archive -lmbedcrypto
${CC} -shared -o ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmbedtls.so -Wl,-soname,libmbedtls.so -Wl,--whole-archive ${SERENITY_INSTALL_ROOT}/usr/local/lib/libmbedtls.a -Wl,--no-whole-archive -lmbedcrypto -lmbedx509
}

View file

@ -1,34 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Larkin <45925460+larb0b@users.noreply.github.com>
Date: Tue, 24 Sep 2019 02:56:39 -0400
Subject: [PATCH] Add missing includes
---
library/ssl_tls.c | 1 +
library/x509_crt.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/library/ssl_tls.c b/library/ssl_tls.c
index 38690fa..5791783 100644
--- a/library/ssl_tls.c
+++ b/library/ssl_tls.c
@@ -49,6 +49,7 @@
#include "mbedtls/platform_util.h"
#include <string.h>
+#include <stdint.h>
#if defined(MBEDTLS_X509_CRT_PARSE_C)
#include "mbedtls/oid.h"
diff --git a/library/x509_crt.c b/library/x509_crt.c
index 97e1d72..9f81247 100644
--- a/library/x509_crt.c
+++ b/library/x509_crt.c
@@ -75,6 +75,7 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
+#include <unistd.h>
#endif /* !_WIN32 || EFIX64 || EFI32 */
#endif

View file

@ -1,22 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Larkin <45925460+larb0b@users.noreply.github.com>
Date: Tue, 24 Sep 2019 02:56:39 -0400
Subject: [PATCH] Remove NET_C from config
---
include/mbedtls/config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/mbedtls/config.h b/include/mbedtls/config.h
index 654f972..5b37f1f 100644
--- a/include/mbedtls/config.h
+++ b/include/mbedtls/config.h
@@ -2460,7 +2460,7 @@
*
* This module provides networking routines.
*/
-#define MBEDTLS_NET_C
+//#define MBEDTLS_NET_C
/**
* \def MBEDTLS_OID_C

View file

@ -1,12 +0,0 @@
# Patches for mbedtls on SerenityOS
## `0001-Add-missing-includes.patch`
Add missing includes
## `0002-Remove-NET_C-from-config.patch`
Remove NET_C from config