From nobody Tue Sep 20 20:31:16 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MXCqm2t1Kz4dLdd; Tue, 20 Sep 2022 20:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MXCqm2PvGz3HhN; Tue, 20 Sep 2022 20:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663705876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtaF5EJls8emlHzKz5r2/zQ8Qem/Va36Y6ewtLWz69U=; b=pl2SdPgDQ3eY97b9CfwgdM8heQESNzzMfMrURUwxaVbC+R6L+Tve6vw5us5Sb7tQ5qKTy0 Bj53Irv9vTmz5SHnxsA6GihdCMPys7sYyirQDfJhmCtY5GjPUY5FlXaN0hOOjyVkz0nYBy 0sI67uBWeyC1+ceauMDhbzUhTjVbgoIrqkH+16BWA9PMLCNWgBqd9zgMoCDOr4iirlOxKy GjQ8nfbB5GN6M/cLW4R2BFjd8QyjaiL+BCwhWUYyFE0W+RUKSVfIEpNeTcovlKaSGuy71B 3PwyWtIP+yDtc6XODhsbNmA1dl/7gbgnXeD8zcbKU3ukZ70sUEBJLlZwz/tdEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MXCqm1S1BzqDw; Tue, 20 Sep 2022 20:31:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28KKVG4I093999; Tue, 20 Sep 2022 20:31:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28KKVG97093998; Tue, 20 Sep 2022 20:31:16 GMT (envelope-from git) Date: Tue, 20 Sep 2022 20:31:16 GMT Message-Id: <202209202031.28KKVG97093998@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tijl Coosemans Subject: git: 01064291636e - main - www/hiawatha: Make it work with Mbed TLS 2.28 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tijl X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01064291636ecbb8aa043e075e8bcf9e1d0918e9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663705876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FtaF5EJls8emlHzKz5r2/zQ8Qem/Va36Y6ewtLWz69U=; b=T/oHlrxCXNnOsJPMK5JXnYwfH3fDniOLJSnzEd5m11zeScgPo5Fd3njeBRg3MM67b/5Gdq b83YsAflmZG8+iN+n4BaUyA/IXVgou3aqqSrOPDkfkoLB7wL3s4sB6yAJ03lrHb1RbBmWI AUZ/LdhojvAwyvmsKbGczmnaWg4pV8Wce1Pq2SvBxH/ohyuRz5DgrmSApt9EuFYQBI5QPR VTVQVejfVKSZ/vvgb5/38j0OSGC6214BkAdr1AD5WVyImz1Z13zkzknGim+/DuoBBbTrc7 XW9e/W6qThTcc/QK2lXyYqAwDwa9FAlASKlzXhyEPEfNb4jYF6DYZ+C18RXgVg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663705876; a=rsa-sha256; cv=none; b=tCGgymagOiqpkpPnc72kINby3mJ1bevDakdq65PuKj8dCd8TjYHq5a63Gcb5lHHPuEvpK7 giaGPGPYqjHOUNK4wMq2ADxkXd/UNhHOBTy1/5drrCdVUgcOW9OMkNYKRlAKDYYKKFH5WJ rXxbwd7pLQEASF+zCKtQomwc00WjL5KKFSI4KUwtDRKdtGMWuRiQNLzmm9zQwzmxEOQKyl uH+2uPWujC2W3n6SrGCRriJMElCIFt3LRkz7mMYIob+O8VEpWe4ahzmd3e0MAH4uaLPWr3 cSWPBO/VplaqaNS+BA5MgPNiarPWfAbBl7S8TcZb0FeNZi8Enb1pJSAXrxHIiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tijl: URL: https://cgit.FreeBSD.org/ports/commit/?id=01064291636ecbb8aa043e075e8bcf9e1d0918e9 commit 01064291636ecbb8aa043e075e8bcf9e1d0918e9 Author: Tijl Coosemans AuthorDate: 2022-09-19 10:35:22 +0000 Commit: Tijl Coosemans CommitDate: 2022-09-20 20:29:15 +0000 www/hiawatha: Make it work with Mbed TLS 2.28 Tested by: Karsten Brand --- www/hiawatha/Makefile | 1 + www/hiawatha/files/patch-src_tls.c | 20 ++++++++++++-------- www/hiawatha/files/patch-src_wigwam.c | 11 ++++------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/www/hiawatha/Makefile b/www/hiawatha/Makefile index 4e2ec5398407..334e8a9cb649 100644 --- a/www/hiawatha/Makefile +++ b/www/hiawatha/Makefile @@ -1,5 +1,6 @@ PORTNAME= hiawatha PORTVERSION= 11.2 +PORTREVISION= 1 CATEGORIES= www MASTER_SITES= https://www.hiawatha-webserver.org/files/ diff --git a/www/hiawatha/files/patch-src_tls.c b/www/hiawatha/files/patch-src_tls.c index e7723e37d069..d549f8bc366c 100644 --- a/www/hiawatha/files/patch-src_tls.c +++ b/www/hiawatha/files/patch-src_tls.c @@ -1,5 +1,14 @@ --- src/tls.c.orig 2022-01-22 12:16:26 UTC +++ src/tls.c +@@ -161,7 +161,7 @@ int init_tls_module(mbedtls_x509_crt *ca_certificates) + int init_tls_module(mbedtls_x509_crt *ca_certificates) { + char version[16]; + +- if (mbedtls_version_get_number() < 0x03000000) { ++ if (mbedtls_version_get_number() < 0x021c0000) { + mbedtls_version_get_string(version); + fprintf(stderr, "This Hiawatha installation requires at least mbed TLS v3.0.0 and you have v%s.\n", version); + return -1; @@ -322,7 +322,7 @@ int tls_load_key_cert(char *file, mbedtls_pk_context * } mbedtls_pk_init(*private_key); @@ -9,17 +18,12 @@ print_tls_error(result, "Error loading private key from %s", file); return -1; } -@@ -436,11 +436,13 @@ int tls_accept(int *sock, mbedtls_ssl_context *context +@@ -436,7 +436,7 @@ int tls_accept(int *sock, mbedtls_ssl_context *context result = TLS_HANDSHAKE_OKE; while ((handshake = mbedtls_ssl_handshake(context)) != 0) { -+#ifndef __FreeBSD__ - if (handshake == MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE) { +- if (handshake == MBEDTLS_ERR_SSL_HANDSHAKE_FAILURE) { ++ if (handshake == MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION) { mbedtls_ssl_free(context); result = TLS_HANDSHAKE_NO_MATCH; break; - } -+#endif - - if ((handshake != MBEDTLS_ERR_SSL_WANT_READ) && (handshake != MBEDTLS_ERR_SSL_WANT_WRITE)) { - mbedtls_ssl_free(context); diff --git a/www/hiawatha/files/patch-src_wigwam.c b/www/hiawatha/files/patch-src_wigwam.c index 47266fdadfa9..cefa70ecc49f 100644 --- a/www/hiawatha/files/patch-src_wigwam.c +++ b/www/hiawatha/files/patch-src_wigwam.c @@ -1,4 +1,4 @@ ---- src/wigwam.c.orig 2022-08-31 17:25:16 UTC +--- src/wigwam.c.orig 2022-06-29 09:42:42 UTC +++ src/wigwam.c @@ -582,7 +582,7 @@ int check_main_config(char *config_dir) { /* Private key check @@ -9,15 +9,12 @@ printf("Error loading private key from %s.\n", needle->value); errors++; goto next_crt; -@@ -601,9 +601,11 @@ int check_main_config(char *config_dir) { +@@ -601,7 +601,7 @@ int check_main_config(char *config_dir) { goto next_crt; } -+#ifndef __FreeBSD__ - if (certificate.MBEDTLS_PRIVATE(sig_md) < MBEDTLS_MD_SHA256) { +- if (certificate.MBEDTLS_PRIVATE(sig_md) < MBEDTLS_MD_SHA256) { ++ if (certificate.sig_md < MBEDTLS_MD_SHA256) { printf("Warning: the certificate signature algoritm in %s should at least be SHA256.\n", needle->value); } -+#endif - next_crt: - last_file = needle->value;