1
0

- fix handling of certificates with same name (bnc#854163)

OBS-URL: https://build.opensuse.org/package/show/Base:System/ca-certificates-mozilla?expand=0&rev=50
This commit is contained in:
Ludwig Nussel 2013-12-09 10:01:15 +00:00 committed by Git OBS Bridge
parent f17e1e87bb
commit ba1b821fcd
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Dec 9 09:56:32 UTC 2013 - lnussel@suse.de
- fix handling of certificates with same name (bnc#854163)
-------------------------------------------------------------------
Tue Oct 29 13:52:16 UTC 2013 - meissner@suse.com

View File

@ -94,10 +94,19 @@ for i in *.crt; do
[ -z "$alias" ] || args+=('-setalias' "$alias")
echo "$i ${args[*]}"
fname="%{buildroot}/%{trustdir_static}$d/${i%%:*}.pem"
if [ -e "$fname" ]; then
fname="${fname%.pem}"
j=1
while [ -e "$fname.$j.pem" ]; do
j=$((j+1))
done
fname="$fname.$j.pem"
fi
{
grep '^#' "$i"
openssl x509 -in "$i" "${args[@]}"
} > "%{buildroot}/%{trustdir_static}$d/${i%%:*}.pem"
} > "$fname"
done
for i in *.p11-kit ; do
install -m 644 "$i" "%{buildroot}/%{trustdir_static}"