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 committed 2022-03-29 01:59:15 +01:00
1 parent 9e109cdd7d
commit 7c97dcd864
2 files changed
+8 -6

No files matched your search

+3 -1
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
+5 -5
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"