get_all_keys.sh: fix error determin active keys.

This commit is contained in:
Christoph 2021-06-01 02:04:27 +02:00
parent c1a50110a9
commit b0c63a4385

View File

@ -277,7 +277,7 @@ else
_cn="$(openssl x509 -noout -text -in $_cert | grep Subject: | grep -oE "CN\s*=\s*[^,]+" | awk '{print$3}')"
all_arr+=("${_serial}:$(trim $_cn)")
if ! containsElement "$_cn" "${revoked_cn_arr[@]}" ; then
if ! containsElement "${_serial}:$(trim $_cn)" "${revoked_arr[@]}" ; then
active_arr+=("${_serial}:$(trim $_cn)")
fi
done < <(find ${OPENVPN_KEY_DIR} -name "??\.pem" -print0 | sort -z )