Skip to content

Commit 1abc6bb

Browse files
fichtnerdag-erling
authored andcommitted
security/ca_root_nss: handle bundle links consistently for ETCSYMLINK
/usr/local/openssl/cert.pem is the default location for security/openssl so it should be handled just like /etc/ssl/cert.pem base OpenSSL. To avoid having samples and copies with differing contents point both files to the actual /usr/local/etc/ssl/cert.pem created by the sample. If users have set their own content that is likely intended and should be enforced across all three files. MFH: 2025Q1 PR: 283161 Differential Revision: https://reviews.freebsd.org/D47908
1 parent a8b5cf4 commit 1abc6bb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

‎security/ca_root_nss/Makefile‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
PORTNAME= ca_root_nss
22
PORTVERSION= ${VERSION_NSS}
3+
PORTREVISION= 1
34
CATEGORIES= security
45
MASTER_SITES= MOZILLA/security/nss/releases/${DISTNAME:tu:C/[-.]/_/g}_RTM/src
56
DISTNAME= nss-${VERSION_NSS}${NSS_SUFFIX}
@@ -21,7 +22,7 @@ OPTIONS_DEFAULT= ETCSYMLINK
2122

2223
OPTIONS_SUB= yes
2324

24-
ETCSYMLINK_DESC= Add symlink to /etc/ssl/cert.pem
25+
ETCSYMLINK_DESC= Add symlinks to default bundle locations
2526
ETCSYMLINK_CONFLICTS_INSTALL= ca-roots-[0-9]*
2627

2728
CERTDIR?= share/certs
@@ -45,11 +46,11 @@ do-install:
4546
${INSTALL_DATA} ${WRKDIR}/ca-root-nss.crt ${STAGEDIR}${PREFIX}/${CERTDIR}
4647
${MKDIR} ${STAGEDIR}${PREFIX}/etc/ssl
4748
${LN} -sf ../../${CERTDIR}/ca-root-nss.crt ${STAGEDIR}${PREFIX}/etc/ssl/cert.pem.sample
48-
${MKDIR} ${STAGEDIR}${PREFIX}/openssl
49-
${LN} -sf ../${CERTDIR}/ca-root-nss.crt ${STAGEDIR}${PREFIX}/openssl/cert.pem.sample
5049

5150
do-install-ETCSYMLINK-on:
51+
${MKDIR} ${STAGEDIR}${PREFIX}/openssl
52+
${LN} -sf ../etc/ssl/cert.pem ${STAGEDIR}${PREFIX}/openssl/cert.pem
5253
${MKDIR} ${STAGEDIR}/etc/ssl
53-
${LN} -sf ../..${PREFIX}/${CERTDIR}/ca-root-nss.crt ${STAGEDIR}/etc/ssl/cert.pem
54+
${LN} -sf ../..${PREFIX}/etc/ssl/cert.pem ${STAGEDIR}/etc/ssl/cert.pem
5455

5556
.include <bsd.port.mk>

‎security/ca_root_nss/pkg-plist‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%%CERTDIR%%/ca-root-nss.crt
22
@sample etc/ssl/cert.pem.sample
3-
@sample openssl/cert.pem.sample
3+
%%ETCSYMLINK%%openssl/cert.pem
44
%%ETCSYMLINK%%/etc/ssl/cert.pem
55
@postexec certctl rehash
66
@postunexec certctl rehash

0 commit comments

Comments
 (0)