make-ca: Use get_p11_label() for certificate name in output of local certs.
This commit is contained in:
parent
7d263b7491
commit
fd033af881
11
make-ca
11
make-ca
@ -732,11 +732,13 @@ if test -d "${LOCALDIR}"; then
|
||||
echo "Processing local certificates..."
|
||||
for cert in `find "${LOCALDIR}" -name "*.pem"`; do
|
||||
# Get some information about the certificate
|
||||
get_p11_label ${cert}
|
||||
keyhash=$("${OPENSSL}" x509 -noout -in "${cert}" -hash)
|
||||
subject=$("${OPENSSL}" x509 -noout -in "${cert}" -subject)
|
||||
# This will always be OpenSSL, values will be separated by spaces
|
||||
certname=$( echo "${subject}" | grep -o "CN = .*" | sed 's@CN = @@' | cut -d "," -f 1)
|
||||
|
||||
if test "${p11label}" == ""; then
|
||||
# This will always be OpenSSL, values will be separated by spaces
|
||||
p11label=$( echo "${subject}" | grep -o "CN = .*" | sed 's@CN = @@' | cut -d "," -f 1)
|
||||
fi
|
||||
echo "Certificate: ${certname}"
|
||||
echo "Keyhash: ${keyhash}"
|
||||
|
||||
@ -774,9 +776,6 @@ if test -d "${LOCALDIR}"; then
|
||||
certcer="$(${OPENSSL} x509 -in ${cert})"
|
||||
certtxt="$(${OPENSSL} x509 -in ${cert} -noout -text)"
|
||||
|
||||
# Place certificate into trust anchors dir
|
||||
get_p11_label "${cert}"
|
||||
|
||||
# Get p11 trust and OID values
|
||||
get_p11_trust
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user