Do full shellcheck test. Wrap nasty long lines.

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
This commit is contained in:
Richard T Bonhomme 2022-03-29 01:59:15 +01:00
parent 9e109cdd7d
commit 7c97dcd864
No known key found for this signature in database
GPG Key ID: 2D767DB92FB6C246
2 changed files with 8 additions and 6 deletions

View File

@ -30,7 +30,9 @@ jobs:
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Run a one-line script
- name: shellcheck test
run: shellcheck easyrsa3/easyrsa
- name: operational test
run: sh op_test.sh -v
# Runs a set of commands using the runners shell

View File

@ -1735,13 +1735,13 @@ display_san() {
format="$1" path="$2"
if echo "$EASYRSA_EXTRA_EXTS" | grep -q subjectAltName; then
#if [ $? -eq 0 ]; then
print "$(echo "$EASYRSA_EXTRA_EXTS" | grep subjectAltName | sed
's/^\s*subjectAltName\s*=\s*//')"
print "$(echo "$EASYRSA_EXTRA_EXTS" | grep subjectAltName |
sed 's/^\s*subjectAltName\s*=\s*//')"
else
san=$(
"$EASYRSA_OPENSSL" "$format" -in "$path" -noout -text | sed -n \
"/X509v3 Subject Alternative Name:/{n;s/ //g;s/IPAddress:/IP:/g;s/RegisteredID/RID/;p;}"
x509v3san="X509v3 Subject Alternative Name:"
"$EASYRSA_OPENSSL" "$format" -in "$path" -noout -text |
sed -n "/${x509v3san}/{n;s/ //g;s/IPAddress:/IP:/g;s/RegisteredID/RID/;p;}"
)
[ -n "$san" ] && print "$san"