Created
December 3, 2017 21:01
-
-
Save w2ak/54ae736732258400f42845d6f67f1b3a to your computer and use it in GitHub Desktop.
easyrsa patch for bash bug and test function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
easyrsa | 4 ++-- | |
1 file changed, 2 insertions(+), 2 deletions(-) | |
diff --git a/easyrsa b/easyrsa | |
index e004e2b..785435b 100755 | |
--- a/easyrsa | |
+++ b/easyrsa | |
@@ -641,7 +641,7 @@ $(display_dn req "$req_in") | |
# If type is server and no subjectAltName was requested, | |
# add one to the extensions file | |
- if [[ "$crt_type" == 'server' ]] | |
+ if [ "$crt_type" = 'server' ] | |
then | |
echo "$EASYRSA_EXTRA_EXTS" | | |
grep -q subjectAltName || | |
@@ -941,7 +941,7 @@ default_server_san() { | |
awk -F'=' '/^ *CN=/{print $2}' | |
) | |
echo "$cn" | egrep -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$' | |
- if [[ $? -eq 0 ]] | |
+ if [ $? -eq 0 ] | |
then | |
print "subjectAltName = IP:$cn" | |
else | |
-- | |
2.15.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment