Update README and minor text modification

This commit is contained in:
DJ Lucas
2019-01-01 20:09:21 -06:00
parent 30fc33d7fe
commit 73c979f2b8
2 changed files with 5 additions and 36 deletions

38
README
View File

@@ -42,43 +42,11 @@ Additionally, for the p11-kit distro hook, remove the "not configured" and
commands:
===============================================================================
# Use make-ca to manage certificates
if [ -f /etc/make-ca.conf ]; then
. /etc/make-ca.conf
else
#Use defaults if make-ca.conf does not exist
ANCHORDIR="/etc/pki/anchors"
ANCHORLIST="/etc/pki/anchors.txt"
LOCALDIR="/etc/ssl/local"
CERTLIST=""
fi
# Create a list of certificates not present at previous run
for ca in `/bin/ls -1 --color=none "${ANCHORDIR}"` ; do
/bin/grep "${ca}" "${ANCHORLIST}" 2>&1>/dev/null || \
CERTLIST="${CERTLIST} ${ca}"
done
# Dump to a temporary directory
TEMPDIR=`mktemp -d`
/usr/bin/trust extract --filter=certificates --format=openssl-directory \
--overwrite "${TEMPDIR}"
# Copy new certificates to LOCALDIR
for certificate in `echo "${CERTLIST}"` ; do
LABEL=`/bin/grep -m 1 "label:" "${ANCHORDIR}/${certificate}"`
LABELNEW=`echo "${LABEL}" | \
/bin/sed -e 's@^label: @@' -e 's@"@@g' -e 's@ @_@g'`
cp -v "${TEMPDIR}/${LABELNEW}.pem" "${LOCALDIR}"
unset LABEL LABELNEW
done
# Clean up
rm -rf "${TEMPDIR}"
unset ANCHORDIR ANCHORLIST LOCALDIR CERTLIST TEMPDIR
# Copy existing modifications to local store
/usr/libexec/make-ca/copy-trust-modifications
# Generate a new trust store
/usr/sbin/make-ca -f
/usr/sbin/make-ca -f -g
EOF
===============================================================================