Skip to content

Commit

Permalink
Merge branch 'TinCanTech-improve-ssl_cert_x509v3_eku'
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Apr 18, 2024
2 parents 84da499 + 934e7f0 commit a28ff0e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -3557,12 +3557,11 @@ ssl_cert_x509v3_eku() {
# Extract certificate Extended Key Usage
if [ "$ssl_lib" = libressl ]; then
__eku="$(
easyrsa_openssl x509 -in "${__crt}" -noout -text | \
"$EASYRSA_OPENSSL" x509 -in "${__crt}" -noout -text | \
sed -n "/${__pattern}/{n;s/^ *//g;p;}"
)"
else
__eku="$(
OPENSSL_CONF=/dev/null
"$EASYRSA_OPENSSL" x509 -in "${__crt}" -noout \
-ext extendedKeyUsage | \
sed -e /"${__pattern}"/d -e s/^\ *//
Expand Down Expand Up @@ -3614,6 +3613,8 @@ ssl_cert_x509v3_eku() {
return
fi

# Also, catch errors from SSL x509 command
# for '__eku' subshell+pipe
return 1
} # => ssl_cert_x509v3_eku()

Expand Down

0 comments on commit a28ff0e

Please sign in to comment.