1
0
ca-certificates-mozilla/compareoldnew
Marcus Meissner 5deb746ba4 - Updated to 2.24 state of the Mozilla NSS Certificate store.
- Removed CAs:
  * S-TRUST_Universal_Root_CA:2.16.96.86.197.75.35.64.91.100.212.237.37.218.217.214.30.30.crt
  * TC_TrustCenter_Class_3_CA_II:2.14.74.71.0.1.0.2.229.160.93.214.63.0.81.191.crt
  * TÜRKTRUST_Elektronik_Sertifika_Hizmet_Sağlayıcısı_H5:2.7.0.142.23.254.36.32.129.crt

OBS-URL: https://build.opensuse.org/package/show/Base:System/ca-certificates-mozilla?expand=0&rev=87
2018-07-06 14:41:33 +00:00

48 lines
1.1 KiB
Bash

#!/bin/bash
# print fingerprints of new or changed certificates
set -e
cleanup()
{
rm -rf new{,.files} old{,.files}
}
showcert()
{
openssl x509 -in "$1" -noout -subject -fingerprint -nameopt multiline,utf8,-esc_msb \
| sed -ne 's/ *commonName *= / CN=/p; s/.*Fingerprint=/ sha1=/p'
sed -ne '/^# \(openssl\|distrust\|alias\)/s/^#/ /p' < "$1"
}
cleanup
trap cleanup EXIT
mkdir old new
cd old
echo old...
ln -s ../.osc/certdata.txt
python3 ../certdata2pem.py > stdout 2> stderr
ls -1 *.crt | sort > ../old.files
cd ..
cd new
echo new...
ln -s ../certdata.txt
python3 ../certdata2pem.py > stdout 2> stderr
ls -1 *.crt | sort > ../new.files
cd ..
echo '----------------------------'
while read line; do
IFS='#' eval set -- \$line
old="$1"
new="$2"
common="$3"
if [ -n "$old" ]; then
echo "- $old"
showcert old/$old
elif [ -n "$new" ]; then
echo "+ $new"
showcert new/$new
elif ! cmp "old/$common" "new/$common"; then
echo "~ $common"
showcert old/$common
showcert new/$common
diff -u old/$common new/$common || true
fi
done < <(comm --output-delimiter='#' old.files new.files)