Bug 293527 - [NEW PORT] security/mbedtls4: embedded TLS library, version 4.X
Summary: [NEW PORT] security/mbedtls4: embedded TLS library, version 4.X
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks: 293528
  Show dependency treegraph
 
Reported: 2026-03-01 14:32 UTC by Paavo-Einari Kaipila
Modified: 2026-03-01 18:10 UTC (History)
1 user (show)

See Also:


Attachments
0001-security-mbedtls4-new-port-embedded-TLS-library.patch (8.93 KB, patch)
2026-03-01 14:32 UTC, Paavo-Einari Kaipila
no flags Details | Diff
0001-security-mbedtls4-new-port-embedded-TLS-library.patch (16.67 KB, patch)
2026-03-01 15:17 UTC, Paavo-Einari Kaipila
no flags Details | Diff
0001-security-mbedtls4-new-port-embedded-TLS-library.patch (8.97 KB, patch)
2026-03-01 15:21 UTC, Paavo-Einari Kaipila
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paavo-Einari Kaipila 2026-03-01 14:32:45 UTC
Created attachment 268452 [details]
0001-security-mbedtls4-new-port-embedded-TLS-library.patch
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2026-03-01 14:54:50 UTC
It conflicts with security/mbedtls3.
Comment 2 Paavo-Einari Kaipila 2026-03-01 15:17:59 UTC
Created attachment 268454 [details]
0001-security-mbedtls4-new-port-embedded-TLS-library.patch

With a conflict declaration.

Testport does report few staging violations, which I'm not quite sure how to fix. Some help would be appreciated with those.
Comment 3 Paavo-Einari Kaipila 2026-03-01 15:21:14 UTC
Created attachment 268455 [details]
0001-security-mbedtls4-new-port-embedded-TLS-library.patch

Oops, there was something extra files there
Comment 4 commit-hook freebsd_committer freebsd_triage 2026-03-01 16:37:15 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0f99c33e2fe4e88b7db6064de4f27e7e5912995c

commit 0f99c33e2fe4e88b7db6064de4f27e7e5912995c
Author:     Paavo-Einari Kaipila <pkaipila@gmail.com>
AuthorDate: 2026-03-01 16:19:08 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-03-01 16:36:37 +0000

    security/mbedtls4: New port 4.0.0

    Changelog:
    https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-4.0.0

    PR:     293527

 security/Makefile           |   1 +
 security/mbedtls4/Makefile  |  14 ++---
 security/mbedtls4/distinfo  |   6 +-
 security/mbedtls4/pkg-plist | 138 ++++++++++++++++++++------------------------
 4 files changed, 73 insertions(+), 86 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2026-03-01 16:37:16 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=305cd2ed702b07784f9799e7ad3fdaeae229bdc2

commit 305cd2ed702b07784f9799e7ad3fdaeae229bdc2
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-03-01 16:08:14 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-03-01 16:36:36 +0000

    security/mbedtls3: Adjust CONFLICTS in anticipation of security/mbedtls4

    PR:             293527
    Approved by:    tijl (implicit)

 security/mbedtls3/Makefile | 2 ++
 1 file changed, 2 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2026-03-01 16:37:17 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a28c15d65ec9a9b13ce417ec62b38d27065345ba

commit a28c15d65ec9a9b13ce417ec62b38d27065345ba
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2026-03-01 16:12:48 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-03-01 16:36:36 +0000

    security/mbedtls4: Repocopy from security/mbedtls3

    PR:     293527

 security/mbedtls4/Makefile (new)  |  48 +++++++++++
 security/mbedtls4/distinfo (new)  |   3 +
 security/mbedtls4/pkg-descr (new) |   2 +
 security/mbedtls4/pkg-plist (new) | 176 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 229 insertions(+)
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2026-03-01 16:40:47 UTC
Are you sure it can't be drop-in replacement from security/mbedtls3?
Comment 8 Vladimir Druzenko freebsd_committer freebsd_triage 2026-03-01 16:49:53 UTC
I'll answer my own question:
> API Changes & Migration
>
> The Mbed TLS 4.0.0 and TF-PSA-Crypto 1.0.0 releases include significant API changes
> that break backward compatibility with previous releases. Please test your integration
> thoroughly and follow the 4.0 migration guide and TF-PSA-Crypto's 1.0 migration guide
> to update your codebase to the new interfaces.

One of the breakage is: move a lot of includes from mbedtls/*.h to mbedtls/private/*.h.
Comment 9 Paavo-Einari Kaipila 2026-03-01 18:10:09 UTC
(In reply to Vladimir Druzenko from comment #8)

Thanks.

New Hiawatwa didn't build with mbedtls3, which does give a hint that other ports might also have cross-version issues.