diff --git a/ca-certificates-mozilla.changes b/ca-certificates-mozilla.changes index 4800e8a..df9ca5c 100644 --- a/ca-certificates-mozilla.changes +++ b/ca-certificates-mozilla.changes @@ -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 diff --git a/ca-certificates-mozilla.spec b/ca-certificates-mozilla.spec index 2248366..85caa3b 100644 --- a/ca-certificates-mozilla.spec +++ b/ca-certificates-mozilla.spec @@ -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}"