Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the default FreeBSD trust store according to certctl(8) #98

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

michael-o
Copy link
Contributor

@michael-o michael-o commented Oct 31, 2024

FreeBSD committer here; The use of ca_root_nss package has been long superseded with a default system-wide truststore used by OpenSSL, managed through certctl(8). There is no need to rely on ca_root_nss package.

src/CaBundle.php Outdated Show resolved Hide resolved
src/CaBundle.php Outdated
@@ -82,15 +82,13 @@ public static function getSystemCaRootBundlePath(?LoggerInterface $logger = null

$otherLocations = array(
'/etc/pki/tls/certs/ca-bundle.crt', // Fedora, RHEL, CentOS (ca-certificates package)
'/etc/ssl/certs/ca-certificates.crt', // Debian, Ubuntu, Gentoo, Arch Linux (ca-certificates package)
'/etc/ssl/certs/ca-certificates.crt', // Debian, Ubuntu, Gentoo, Arch Linux (ca-certificates package), FreeBSD (only the /etc/ssl/certs dir which gets added below)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really read awkward. It looks rather like a hack than a fix. Maybe a test in the look shall determine whether otherLocations entry is a dir or file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I tweaked it but this will remove a few lookups, which I think is probably fine.. Hopefully it doesn't cause regressions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, merged appreciated. As soon as this lands in composer I will create a downstream PR to remove the depencency to ca_root_nss in FreeBSD.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composer 2.8.3 ships with this PR

Copy link
Contributor Author

@michael-o michael-o Nov 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Composer 2.8.3 ships with this PR

Magic, thank you!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Seldaek Seldaek merged commit 3b1fc3f into composer:main Nov 4, 2024
13 checks passed
@michael-o michael-o deleted the freebsd-default-trust-store branch November 4, 2024 10:22
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Nov 18, 2024
Also Remove dependency on ca_root_nss, upstream code now uses the system trust store. [1]

[1] composer/ca-bundle#98 (comment)

PR:		282816
Approved by:	Naram Qashat <[email protected]> (maintainer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants